com.caucho.ejb.protocol
Class ClientContainer

java.lang.Object
  extended by com.caucho.ejb.protocol.ClientContainer

public abstract class ClientContainer
extends java.lang.Object

Container for EJB stubs.


Field Summary
protected  HandleEncoder _handleEncoder
           
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
protected ClientContainer(java.lang.String serverId)
          Creates a new client container
 
Method Summary
protected abstract  EJBHome createHomeStub()
          Creates the home stub for the container.
protected abstract  EJBObject createObjectStub(java.lang.String url)
          Creates the stub for the remote object for the given Handle.
 java.lang.Object getEJBLocalHome()
          Returns the home stub for the container.
 HandleEncoder getHandleEncoder(AbstractHandle handle)
           
 EJBHome getHomeStub()
          Returns the home stub for the container.
 EJBObject getObjectStub(java.lang.String url)
          Returns a remote stub for the given handle
 java.lang.Class getPrimaryKeyClass()
          Returns the object key from a handle.
protected  java.lang.String getServerId()
          Returns the bean's url prefix
 java.lang.String toString()
          Returns a printable version of the client container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

L

protected static L10N L

log

protected static java.util.logging.Logger log

_handleEncoder

protected HandleEncoder _handleEncoder
Constructor Detail

ClientContainer

protected ClientContainer(java.lang.String serverId)
Creates a new client container

Parameters:
serverId - the server's unique ID
Method Detail

getServerId

protected java.lang.String getServerId()
Returns the bean's url prefix


getHomeStub

public EJBHome getHomeStub()
                    throws java.lang.Exception
Returns the home stub for the container.

Returns:
the bean's home stub
Throws:
java.lang.Exception

getEJBLocalHome

public java.lang.Object getEJBLocalHome()
Returns the home stub for the container.

Returns:
the bean's home stub

createHomeStub

protected abstract EJBHome createHomeStub()
                                   throws java.lang.Exception
Creates the home stub for the container.

Returns:
the bean's home stub
Throws:
java.lang.Exception

getHandleEncoder

public HandleEncoder getHandleEncoder(AbstractHandle handle)

getPrimaryKeyClass

public java.lang.Class getPrimaryKeyClass()
Returns the object key from a handle.


getObjectStub

public EJBObject getObjectStub(java.lang.String url)
                        throws java.lang.Exception
Returns a remote stub for the given handle

Parameters:
handle - the handle for the remote bean
Returns:
the bean's remote stub
Throws:
java.lang.Exception

createObjectStub

protected abstract EJBObject createObjectStub(java.lang.String url)
                                       throws java.lang.Exception
Creates the stub for the remote object for the given Handle.

Parameters:
handle - the handle for the remote object
Returns:
the bean's remote stub
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Returns a printable version of the client container

Overrides:
toString in class java.lang.Object