org.cometd.common
Class ChannelId

java.lang.Object
  extended by 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)
           
 
Method Summary
 int depth()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getSegment(int i)
           
 int hashCode()
           
 boolean isDeepWild()
           
 boolean isMeta()
           
static boolean isMeta(java.lang.String channelId)
           
 boolean isParentOf(ChannelId id)
           
 boolean isService()
           
static boolean isService(java.lang.String channelId)
           
 boolean isWild()
           
 boolean matches(ChannelId name)
          Match channel IDs with wildcard support
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

ChannelId

public ChannelId(java.lang.String name)
Method Detail

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()

isParentOf

public boolean isParentOf(ChannelId id)

getSegment

public java.lang.String getSegment(int i)

isMeta

public static boolean isMeta(java.lang.String channelId)

isService

public static boolean isService(java.lang.String channelId)


Copyright © 2010 Dojo Foundation. All Rights Reserved.