xmlBlaster 1.6.2 API

org.xmlBlaster.util.queue
Class StorageId

java.lang.Object
  extended byorg.xmlBlaster.util.queue.StorageId
All Implemented Interfaces:
java.io.Serializable

public class StorageId
extends java.lang.Object
implements java.io.Serializable

Class encapsulating the unique id of a queue or a cache.

Author:
michele@laghi.eu, xmlBlaster@marcelruff.info
See Also:
Serialized Form

Field Summary
private  java.lang.String id
           
private  java.lang.String postfix
           
private  java.lang.String prefix
           
private static long serialVersionUID
           
private  java.lang.String strippedId
           
private  java.lang.String xbNode
           
private  java.lang.String xbPostfix
           
 
Constructor Summary
StorageId(Global glob, java.lang.String id)
          Parse and create a unique id.
StorageId(java.lang.String prefix, java.lang.String postfix)
          Create a unique id, e.g.
 
Method Summary
 java.lang.String getId()
           
 java.lang.String getPostfix()
           
 java.lang.String getPrefix()
           
 java.lang.String getStrippedId()
          The id usable for file names and is used for the queue and message-store names.
 XBStore getXBStore()
          returns an XBStore without having filled the id nor the flag1 member variables.
private  void splitPostfix(java.lang.String post)
           
 java.lang.String toString()
           
static StorageId valueOf(java.lang.String strippedStorageId)
          Not functional, we have no guaranteed way to find out the real id from the stripped id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

prefix

private final transient java.lang.String prefix

postfix

private final transient java.lang.String postfix

strippedId

private java.lang.String strippedId

id

private final java.lang.String id

xbNode

private transient java.lang.String xbNode

xbPostfix

private transient java.lang.String xbPostfix
Constructor Detail

StorageId

public StorageId(java.lang.String prefix,
                 java.lang.String postfix)
Create a unique id, e.g. "history:/node/heron/client/joe/-2"

Parameters:
prefix - e.g. "history" param postfix unique string e.g. "/node/heron/client/joe/-2"

StorageId

public StorageId(Global glob,
                 java.lang.String id)
          throws XmlBlasterException
Parse and create a unique id.

A queueId must be of the kind cb:some/id/or/someother where the important requirement here is that it contains a ':' character. The text on the left side of the separator (in this case 'cb') tells which kind of queue it is: for example a callback queue (cb) or a client queue.

Throws:
XmlBlasterException - if no separator ":" was found
Method Detail

splitPostfix

private final void splitPostfix(java.lang.String post)

valueOf

public static StorageId valueOf(java.lang.String strippedStorageId)
Not functional, we have no guaranteed way to find out the real id from the stripped id.

Parameters:
strippedStorageId -
Returns:
storageId.getId() is not recovered properly, can be null

getPrefix

public java.lang.String getPrefix()
Returns:
e.g. "history"

getPostfix

public java.lang.String getPostfix()
Returns:
e.g. "/node/heron/client/joe/-2"

getId

public java.lang.String getId()
Returns:
e.g. "history:/node/heron/client/joe/-2"

getStrippedId

public java.lang.String getStrippedId()
The id usable for file names and is used for the queue and message-store names.

NOTE: This name should never change in future xmlBlaster releases. If it changes the new release would not find old database entries!

Returns:
e.g. "history_nodeheronclientjoe-2"
See Also:
Global.getStrippedString(String)

toString

public java.lang.String toString()
Returns:
getId()

getXBStore

public XBStore getXBStore()
returns an XBStore without having filled the id nor the flag1 member variables.

Returns:

xmlBlaster 1.6.2 API

Copyright © 1999-2007 The xmlBlaster.org contributers.