xmlBlaster 1.6.2 client 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

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.
 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
 

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

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

xmlBlaster 1.6.2 client API

Copyright © 1999-2007 The xmlBlaster.org contributers.