|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.util.SessionName
Handles unified naming convention of login names and user sessions. Instances are immutable.
SessionNameTest,
The client.failsafe requirement,
Serialized Form| Field Summary | |
private java.lang.String |
absoluteName
The absolute name |
private Global |
glob
|
private static java.lang.String |
ME
Name for logging output |
private NodeId |
nodeId
|
private boolean |
nodeIdExplicitlyGiven
|
private long |
pubSessionId
|
private java.lang.String |
relativeName
|
static java.lang.String |
ROOT_MARKER_TAG
|
private static long |
serialVersionUID
|
static java.lang.String |
SUBJECT_MARKER_TAG
|
private java.lang.String |
subjectId
|
private static boolean |
useSessionMarker
|
| Constructor Summary | |
SessionName(Global glob,
NodeId nodeId,
java.lang.String name)
|
|
SessionName(Global glob,
NodeId nodeId,
java.lang.String subjectId,
long pubSessionId)
|
|
SessionName(Global glob,
SessionName sessionName,
long pubSessionId)
Create a new instance based on the given sessionName but with added/changed pubSessionId |
|
SessionName(Global glob,
java.lang.String name)
Create and parse a unified name. |
|
| Method Summary | |
boolean |
equalsAbsolute(SessionName sessionName)
|
boolean |
equalsRelative(SessionName sessionName)
|
java.lang.String |
getAbsoluteName()
If the nodeId is not known, the relative name is returned |
java.lang.String |
getLoginName()
|
NodeId |
getNodeId()
|
java.lang.String |
getNodeIdStr()
|
long |
getPublicSessionId()
|
java.lang.String |
getRelativeName()
|
java.lang.String |
getRelativeName(boolean forceSessionMarker)
|
java.lang.String |
getRelativePubSessionIdWildcard()
Note: no blanks in the example below are allowed, we need to write it like this to distinguish it from a java comment |
java.lang.String |
getRelativeSubjectIdWildcard()
Note: no blanks in the example below are allowed, we need to write it like this to distinguish it from a java comment |
java.lang.String |
getRelativeWildcard()
Note: no blanks in the example below are allowed, we need to write it like this to distinguish it from a java comment |
boolean |
isCoreInternalLoginName()
|
boolean |
isInternalLoginName()
|
boolean |
isNodeIdExplicitlyGiven()
Check if the address string given to our constructor had an explicit specified nodeId |
boolean |
isPluginInternalLoginName()
|
boolean |
isPubSessionIdInternal()
|
boolean |
isPubSessionIdUser()
|
boolean |
isSession()
Check if we hold a session or a subject |
static void |
main(java.lang.String[] args)
Method for testing only. Invoke: java -Djava.compiler= org.xmlBlaster.util.SessionName -name client/jack/1 |
boolean |
matchRelativeName(java.lang.String pattern)
Check matching name, the subjectId or pubSessionId can be a wildcard "*" (note: no blanks in the example below are allowed, we need to write it like this to distinguish it from a java comment) |
java.lang.String |
toString()
|
java.lang.String |
toXml()
Dump state of this object into a XML ASCII string. |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string. |
static boolean |
useSessionMarker()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
private static java.lang.String ME
private final transient Global glob
public static final java.lang.String ROOT_MARKER_TAG
public static final java.lang.String SUBJECT_MARKER_TAG
private java.lang.String absoluteName
private NodeId nodeId
private java.lang.String relativeName
private final java.lang.String subjectId
private long pubSessionId
private boolean nodeIdExplicitlyGiven
private static boolean useSessionMarker
| Constructor Detail |
public SessionName(Global glob,
java.lang.String name)
name - Examples:
/node/heron/client/joe/2 client/joe/2 joe/2 joe /node/heron/client/joe/session/2 client/joe/session/2 joe/session/2
java.lang.IllegalArgumentException - if your name can't be parsed
public SessionName(Global glob,
NodeId nodeId,
java.lang.String subjectId,
long pubSessionId)
public SessionName(Global glob,
NodeId nodeId,
java.lang.String name)
nodeId - if not null it has precedence to the nodeId which is probably found in namename - Examples:
/node/heron/client/joe/2 client/joe/2 joe/2 joeThe EventPlugin supports wildcard '*' as sessionNumber, to be able to use this parser we map it to Long.MIN_VALUE
java.lang.IllegalArgumentException - if your name can't be parsed
public SessionName(Global glob,
SessionName sessionName,
long pubSessionId)
| Method Detail |
public static boolean useSessionMarker()
public java.lang.String getAbsoluteName()
public java.lang.String toString()
public java.lang.String getRelativeName()
public java.lang.String getRelativeName(boolean forceSessionMarker)
forceSessionMarker - If false the configured syntax is chosen, if true wie force the /session/ markup
public boolean isNodeIdExplicitlyGiven()
public NodeId getNodeId()
public java.lang.String getNodeIdStr()
public java.lang.String getLoginName()
public final boolean isInternalLoginName()
public final boolean isPluginInternalLoginName()
public final boolean isCoreInternalLoginName()
public long getPublicSessionId()
public boolean isSession()
public boolean isPubSessionIdInternal()
public boolean isPubSessionIdUser()
public boolean equalsRelative(SessionName sessionName)
public boolean equalsAbsolute(SessionName sessionName)
public boolean matchRelativeName(java.lang.String pattern)
pattern - for example "client/ * /session/ *", ""client/ * /session/1", "client/joe/session/ *", "client/joe/session/1"
public java.lang.String getRelativeSubjectIdWildcard()
public java.lang.String getRelativePubSessionIdWildcard()
public java.lang.String getRelativeWildcard()
public final java.lang.String toXml()
public final java.lang.String toXml(java.lang.String extraOffset)
extraOffset - indenting of tags for nice output
public static void main(java.lang.String[] args)
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||