/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.event; import org.apache.wicket.Application; import org.apache.wicket.Component; import org.apache.wicket.Page; import org.apache.wicket.Session; import org.apache.wicket.request.cycle.RequestCycle; /** * Defines the event broadcast type. * * @author igor */ public enum Broadcast { /** * Breadth first traversal. Supported sinks in order of traversal: * *
    *
  1. {@link Application}
  2. *
  3. {@link Session}
  4. *
  5. {@link RequestCycle}
  6. *
  7. {@link Page}
  8. *
  9. {@link Component}s
  10. *
* * Components receive the event with a preorder breadth-first traversal, eg: Apply recursively: *
    *
  1. The component receives the event
  2. *
  3. The component's children receive the event
  4. *
* * Any sink along the path can be specified and traversal will start with the specified sink as * root, eg: * * */ BREADTH, /** * Depth first traversal. Supported sinks in order of traversal: * *
    *
  1. {@link Component}s
  2. *
  3. {@link Page}
  4. *
  5. {@link RequestCycle}
  6. *
  7. {@link Session}
  8. *
  9. {@link Application}
  10. *
* * Components receive the event with a postorder depth-first traversal, eg: Apply recursively: *
    *
  1. The component's children receive the event
  2. *
  3. The component receives the event
  4. *
* * Any sink along the path can be specified and traversal will start with the specified sink as * root, eg: * * * */ DEPTH, /** * A bubble-up traversal. In a bubble-up traversal only the sink and its parents are notified. * * Supported sinks in order of traversal are: *
    *
  1. {@link Component}s
  2. *
  3. {@link Page}
  4. *
  5. {@link RequestCycle}
  6. *
  7. {@link Session}
  8. *
  9. {@link Application}
  10. *
* * Any sink along the path can be specified and traversal will start at the specified sink and * work its way up to the {@link Application}, eg: * * */ BUBBLE, /** * Only the specified sink receives the event */ EXACT }