|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.remote.service.BaseRemoteService
public abstract class BaseRemoteService
A generic implementation of an RemoteService. Can be subclassed to work with different remoting mechanisms, such as Hessian or JAXRPC.
Field Summary | |
---|---|
protected ObjectContextFactory |
contextFactory
|
protected java.lang.String |
eventBridgeFactoryName
|
protected java.util.Map<java.lang.String,java.lang.String> |
eventBridgeParameters
|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
BaseRemoteService(ObjectContextFactory contextFactory,
java.util.Map<java.lang.String,java.lang.String> eventBridgeProperties)
|
Method Summary | |
---|---|
protected DataChannel |
createChannel()
Creates a server-side channel that will handle all client requests. |
protected RemoteSession |
createRemoteSession(java.lang.String sessionId,
java.lang.String name,
boolean enableEvents)
|
protected abstract ServerSession |
createServerSession()
Creates a new ServerSession with a dedicated DataChannel. |
protected abstract ServerSession |
createServerSession(java.lang.String name)
Creates a new ServerSession based on a shared DataChannel. |
RemoteSession |
establishSession()
Establishes a dedicated session with Cayenne DataChannel, returning session id. |
RemoteSession |
establishSharedSession(java.lang.String name)
Creates a new session with the specified or joins an existing one. |
java.lang.String |
getEventBridgeFactoryName()
|
java.util.Map<java.lang.String,java.lang.String> |
getEventBridgeParameters()
|
protected abstract ServerSession |
getServerSession()
Returns a ServerSession object that represents Cayenne-related state associated with the current session. |
protected void |
initEventBridgeParameters(java.util.Map<java.lang.String,java.lang.String> properties)
Initializes EventBridge parameters for remote clients peer-to-peer communications. |
java.lang.Object |
processMessage(ClientMessage message)
Processes message on a remote server, returning the result of such processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
protected ObjectContextFactory contextFactory
protected java.lang.String eventBridgeFactoryName
protected java.util.Map<java.lang.String,java.lang.String> eventBridgeParameters
Constructor Detail |
---|
public BaseRemoteService(ObjectContextFactory contextFactory, java.util.Map<java.lang.String,java.lang.String> eventBridgeProperties)
Method Detail |
---|
public java.lang.String getEventBridgeFactoryName()
public java.util.Map<java.lang.String,java.lang.String> getEventBridgeParameters()
protected abstract ServerSession createServerSession()
protected abstract ServerSession createServerSession(java.lang.String name)
name
- shared session name used to lookup a shared DataChannel.protected abstract ServerSession getServerSession()
public RemoteSession establishSession()
RemoteService
establishSession
in interface RemoteService
public RemoteSession establishSharedSession(java.lang.String name)
RemoteService
establishSharedSession
in interface RemoteService
public java.lang.Object processMessage(ClientMessage message) throws java.lang.Throwable
RemoteService
processMessage
in interface RemoteService
java.lang.Throwable
protected RemoteSession createRemoteSession(java.lang.String sessionId, java.lang.String name, boolean enableEvents)
protected DataChannel createChannel()
ClientServerChannel
instance wrapping a
DataContext. Subclasses may override the method to customize channel creation. For
instance they may wrap channel in the custom interceptors to handle transactions or
security.
protected void initEventBridgeParameters(java.util.Map<java.lang.String,java.lang.String> properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |