org.atmosphere.util
Class BroadcasterLookup
java.lang.Object
org.atmosphere.util.BroadcasterLookup
public class BroadcasterLookup
- extends Object
A class that can be used to lookup Broadcaster
based on the returned value of Broadcaster.getName() and
Broadcaster.getScope()
- Author:
- Jeanfrancois Arcand
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BroadcasterLookup
public BroadcasterLookup()
lookup
public final Broadcaster lookup(String name)
throws BroadcasterLookup.OutOfScopeException
- Lookup a
Broadcaster instance using Broadcaster.getName().
- Parameters:
name - The Broadcaster's name.
- Returns:
- a Broadcaster, or null if not found.
- Throws:
org.atmosphere.cpr.BroadcasterLookup.OutOfScopeException
BroadcasterLookup.OutOfScopeException
add
public final boolean add(Broadcaster b)
- Add a
Broadcaster to the list.
- Parameters:
b - a broadcaster
- Returns:
- false if a with the same name
Broadcaster was already stored
remove
public final boolean remove(Broadcaster b)
- Remove a
Broadcaster to the list.
- Parameters:
b - a broadcaster
- Returns:
- false if wasn't present, or
Broadcaster
Copyright © 2009 SUN Microsystems. All Rights Reserved.