org.cometd.common
Class ChannelId

java.lang.Object
  extended by org.cometd.common.ChannelId

public class ChannelId
extends Object

Holder of a channel ID broken into path segments


Field Summary
static String DEEPWILD
           
static String WILD
           
 
Constructor Summary
ChannelId(String name)
           
 
Method Summary
 int depth()
           
 boolean equals(Object obj)
           
 String getParent()
           
 String getSegment(int i)
           
 List<String> getWilds()
           
 int hashCode()
           
 boolean isAncestorOf(ChannelId id)
           
 boolean isDeepWild()
           
 boolean isMeta()
           
static boolean isMeta(String channelId)
           
 boolean isParentOf(ChannelId id)
           
 boolean isService()
           
static boolean isService(String channelId)
           
 boolean isWild()
           
 boolean matches(ChannelId name)
          Match channel IDs with wildcard support
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WILD

public static final String WILD
See Also:
Constant Field Values

DEEPWILD

public static final String DEEPWILD
See Also:
Constant Field Values
Constructor Detail

ChannelId

public ChannelId(String name)
Method Detail

isWild

public boolean isWild()

isDeepWild

public boolean isDeepWild()

isMeta

public boolean isMeta()

isService

public boolean isService()

equals

public boolean equals(Object obj)
Overrides:
equals in class 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 Object

toString

public String toString()
Overrides:
toString in class Object

depth

public int depth()

isAncestorOf

public boolean isAncestorOf(ChannelId id)

isParentOf

public boolean isParentOf(ChannelId id)

getParent

public String getParent()

getSegment

public String getSegment(int i)

getWilds

public List<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(String channelId)

isService

public static boolean isService(String channelId)


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.