org.cometd.common
Class ChannelId
java.lang.Object
org.cometd.common.ChannelId
public class ChannelId
- extends java.lang.Object
Holder of a channel ID broken into path segments
|
Field Summary |
static java.lang.String |
DEEPWILD
|
static java.lang.String |
WILD
|
|
Constructor Summary |
ChannelId(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
WILD
public static final java.lang.String WILD
- See Also:
- Constant Field Values
DEEPWILD
public static final java.lang.String DEEPWILD
- See Also:
- Constant Field Values
ChannelId
public ChannelId(java.lang.String name)
isWild
public boolean isWild()
isDeepWild
public boolean isDeepWild()
isMeta
public boolean isMeta()
isService
public boolean isService()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
matches
public boolean matches(ChannelId name)
- Match channel IDs with wildcard support
- Parameters:
name -
- Returns:
- true if this channelID matches the passed channel ID. If this channel is wild, then matching is wild.
If the passed channel is wild, then it is the same as an equals call.
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
depth
public int depth()
isAncestorOf
public boolean isAncestorOf(ChannelId id)
isParentOf
public boolean isParentOf(ChannelId id)
getParent
public java.lang.String getParent()
getSegment
public java.lang.String getSegment(int i)
getWilds
public java.util.List<java.lang.String> getWilds()
- Returns:
- The list of wilds channels that match this channel, or
the empty list if this channel is already wild.
isMeta
public static boolean isMeta(java.lang.String channelId)
isService
public static boolean isService(java.lang.String channelId)
Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.