|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.remote.BaseConnection
org.apache.cayenne.remote.hessian.HessianConnection
public class HessianConnection
An ClientConnection that passes messages to a remotely deployed HessianService. It supports HTTP BASIC authentication. HessianConnection serializes messages using Hessian binary web service protocol over HTTP. For more info on Hessian see Caucho site at http://www.caucho.com/resin-3.0/protocols/hessian.xtp. HessianConnection supports logging of message traffic via Jakarta commons-logging API.
Field Summary | |
---|---|
static String[] |
CLIENT_SERIALIZER_FACTORIES
|
protected String |
password
|
protected RemoteService |
service
|
protected RemoteSession |
session
|
protected String |
sharedSessionName
|
protected String |
url
|
protected String |
userName
|
Fields inherited from class org.apache.cayenne.remote.BaseConnection |
---|
messageId |
Constructor Summary | |
---|---|
HessianConnection(String url)
Creates HessianConnection that will establish dedicated session and will not use HTTP basic authentication. |
|
HessianConnection(String url,
String userName,
String password,
String sharedSessionName)
Creates a HessianConnection. |
Method Summary | |
---|---|
protected void |
beforeSendMessage(ClientMessage message)
Establishes server session if needed. |
protected void |
connect()
Establishes a session with remote service. |
protected Object |
doSendMessage(ClientMessage message)
Sends a message to remote Cayenne Hessian service. |
String |
getPassword()
Returns password that is used for basic authentication when connecting to the cayenne server. |
EventBridge |
getServerEventBridge()
Returns an EventBridge that receives remote server events. |
RemoteSession |
getSession()
Returns internal RemoteSession instance. |
String |
getSharedSessionName()
|
String |
getUrl()
Returns a URL of Cayenne service used by this connector. |
String |
getUserName()
Returns user name that is used for basic authentication when connecting to the cayenne server. |
Methods inherited from class org.apache.cayenne.remote.BaseConnection |
---|
getProcessedMessagesCount, sendMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] CLIENT_SERIALIZER_FACTORIES
protected String url
protected String userName
protected String password
protected String sharedSessionName
protected RemoteSession session
protected RemoteService service
Constructor Detail |
---|
public HessianConnection(String url)
public HessianConnection(String url, String userName, String password, String sharedSessionName)
url
is the
only required parameter.
Method Detail |
---|
public String getUrl()
public String getUserName()
public String getPassword()
public String getSharedSessionName()
public EventBridge getServerEventBridge() throws CayenneRuntimeException
ClientConnection
CayenneRuntimeException
public RemoteSession getSession()
protected void beforeSendMessage(ClientMessage message) throws CayenneRuntimeException
beforeSendMessage
in class BaseConnection
CayenneRuntimeException
protected Object doSendMessage(ClientMessage message) throws CayenneRuntimeException
doSendMessage
in class BaseConnection
CayenneRuntimeException
protected void connect() throws CayenneRuntimeException
CayenneRuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |