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, getClientContext
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
public 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.Exception
public 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.Source
public void removeResponseListener(NetResponseEvent.Listener l)
removeResponseListener
in interface NetResponseEvent.Source
public void addRequestListener(NetRequestEvent.Listener l)
addRequestListener
in interface NetRequestEvent.Source
public void removeRequestListener(NetRequestEvent.Listener l)
removeRequestListener
in interface NetRequestEvent.Source
Copyright © 2014 EsprIT-Systems. All Rights Reserved.