com.caucho.ejb.protocol
Class HandleEncoder

java.lang.Object
  extended by com.caucho.ejb.protocol.HandleEncoder
Direct Known Subclasses:
BurlapHandleEncoder, HessianHandleEncoder

public class HandleEncoder
extends java.lang.Object

Encodes and decodes handles.


Constructor Summary
HandleEncoder(AbstractServer server, java.lang.String serverId)
           
HandleEncoder(java.lang.String serverId)
           
 
Method Summary
 AbstractHandle createHandle(java.lang.String objectId)
          Creates a handle given the server id and the object id.
 AbstractHomeHandle createHomeHandle()
          Creates a home handle given the server id.
 java.lang.String createRandomStringKey()
          Creates a random string key.
protected  java.lang.String encodePrimaryKey(java.lang.Object primaryKey)
          Encodes the primary key as a string.
protected  AbstractServer getServer()
           
 java.lang.String getServerId()
           
 java.lang.String getURL()
          Converts the primary key to a URL.
 java.lang.String getURL(java.lang.String primaryKey)
          Converts the primary key to a URL.
 java.lang.Object objectIdToKey(java.lang.Object id)
           
protected  void setServer(AbstractServer server)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandleEncoder

public HandleEncoder(java.lang.String serverId)

HandleEncoder

public HandleEncoder(AbstractServer server,
                     java.lang.String serverId)
Method Detail

getServerId

public java.lang.String getServerId()

setServer

protected void setServer(AbstractServer server)

getServer

protected AbstractServer getServer()

createHomeHandle

public AbstractHomeHandle createHomeHandle()
Creates a home handle given the server id.


getURL

public java.lang.String getURL()
Converts the primary key to a URL.


getURL

public java.lang.String getURL(java.lang.String primaryKey)
Converts the primary key to a URL.


createHandle

public AbstractHandle createHandle(java.lang.String objectId)
Creates a handle given the server id and the object id.


createRandomStringKey

public java.lang.String createRandomStringKey()
Creates a random string key.


encodePrimaryKey

protected java.lang.String encodePrimaryKey(java.lang.Object primaryKey)
Encodes the primary key as a string.


objectIdToKey

public java.lang.Object objectIdToKey(java.lang.Object id)