flex.messaging.services.messaging
Class Subtopic

java.lang.Object
  extended by flex.messaging.services.messaging.Subtopic

public class Subtopic
extends Object

Represents a message destination subtopic. You are given instances of Subtopics as arguments to the MessagingAdapter.allowSubscribe and allowSend methods. These are used to implement your own authorization for the subscribe and send messages to specific subtopics.


Field Summary
static String SUBTOPIC_WILDCARD
          The wildcard token for hierarchical subtopics.
 
Method Summary
 boolean containsSubtopicWildcard()
          Returns true if the subtopic contains a hierarchical subtopic wildcard.
 boolean equals(Object other)
           
 String getSeparator()
          Returns the separator used to create this Subtopic instance.
 String getValue()
          Returns the subtopic value used to create this Subtopic instance.
 int hashCode()
           
 boolean isHierarchical()
          Returns true is the subtopic is hierarchical.
 boolean matches(Subtopic other)
          Matches the passed subtopic against this subtopic.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBTOPIC_WILDCARD

public static final String SUBTOPIC_WILDCARD
The wildcard token for hierarchical subtopics.

See Also:
Constant Field Values
Method Detail

containsSubtopicWildcard

public boolean containsSubtopicWildcard()
Returns true if the subtopic contains a hierarchical subtopic wildcard.

Returns:
true if the subtopic contains a hierarchical subtopic wildcard, otherwise false.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

getSeparator

public String getSeparator()
Returns the separator used to create this Subtopic instance. This value may be null.

Returns:
The separator used to create this Subtopic instance.

getValue

public String getValue()
Returns the subtopic value used to create this Subtopic instance.

Returns:
The subtopic value used to create this Subtopic instance.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isHierarchical

public boolean isHierarchical()
Returns true is the subtopic is hierarchical.

Returns:
true if the subtopic is hierarchical, otherwise false.

matches

public boolean matches(Subtopic other)
Matches the passed subtopic against this subtopic. If neither subtopic contains a wildcard they must literally match. If one or the other contains a wildcard they may match. "chatrooms.*" will match "chatrooms.lobby" or "chatrooms.us.ca" but will not match "chatrooms" (assuming a subtopic separator of "."). "chatrooms.*.ca" will match "chatrooms.us.ca" but not "chatrooms.us.ma".

Parameters:
other - The other subtopic to match against this subtopic.
Returns:
true if they match, otherwise false.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/messaging/services/messaging/Subtopic.html