public final class RequestChannel extends AbstractClientObject<ClientContext> implements NetRequestEvent.Source, NetResponseEvent.Source
| Constructor and Description |
|---|
RequestChannel(ClientContext clientCtx,
ClientNetworkAdapter networkAdapter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestListener(NetRequestEvent.Listener l) |
void |
addResponseListener(NetResponseEvent.Listener l) |
void |
connect() |
boolean |
disconnect() |
java.lang.String |
getConnectionInfoLocal() |
java.lang.String |
getConnectionInfoRemote() |
ClientNetworkAdapter |
getNetworkAdapter()
Returns the
ClientConnector instance which maintains the connection to the server |
SessionId |
getSessionId() |
boolean |
isLoggedIn() |
void |
removeRequestListener(NetRequestEvent.Listener l) |
void |
removeResponseListener(NetResponseEvent.Listener l) |
<A extends Agent> |
sendExecuteAgent(A agentIn)
Sends the given agent to the server and returns a copy of the server-processed agent.
|
NetResponse |
sendRequest(NetRequest request)
Sends a
NetRequest object to the server and returns the NetResponse object to the client. |
getClientConfig, getClientContextgetApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toStringpublic RequestChannel(ClientContext clientCtx, ClientNetworkAdapter networkAdapter)
public final ClientNetworkAdapter getNetworkAdapter()
ClientConnector instance which maintains the connection to the serverpublic SessionId getSessionId()
public java.lang.String getConnectionInfoLocal()
public java.lang.String getConnectionInfoRemote()
public boolean isLoggedIn()
public void connect()
throws java.lang.Exception
java.lang.Exceptionpublic boolean disconnect()
public NetResponse sendRequest(NetRequest request)
NetRequest object to the server and returns the NetResponse object to the client. Note
that the response object is guaranteed not to be null but it must be checked for errors with the hasError()
method.public <A extends Agent> A sendExecuteAgent(A agentIn)
public void addResponseListener(NetResponseEvent.Listener l)
addResponseListener in interface NetResponseEvent.Sourcepublic void removeResponseListener(NetResponseEvent.Listener l)
removeResponseListener in interface NetResponseEvent.Sourcepublic void addRequestListener(NetRequestEvent.Listener l)
addRequestListener in interface NetRequestEvent.Sourcepublic void removeRequestListener(NetRequestEvent.Listener l)
removeRequestListener in interface NetRequestEvent.SourceCopyright © 2014 EsprIT-Systems. All Rights Reserved.