public class NetRequest extends TransferableObject
NetResponse
,
NetCommand
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_REQUEST_TIMEOUT |
Constructor and Description |
---|
NetRequest(NetCommand cmd) |
NetRequest(NetCommand cmd,
java.lang.Object arg) |
Modifier and Type | Method and Description |
---|---|
NetResponse |
createErrorResponse(java.lang.Exception exc) |
NetResponse |
createResponse()
Creates a NetResponse object according to this NetRequest.
|
java.lang.Object |
getArgument()
Returns the request's argument object.
|
NetCommand |
getCommand()
Returns the request's command value.
|
java.lang.String |
getIdentifierString()
Short identifier string used in error messages concerning this request
|
int |
getPriority()
Returns the thread priority which is used to executed this agent
|
static long |
getRequestCount()
Tells how many requests the client has sent already.
|
long |
getRequestId()
Returns a client side unique request number of this request (the n-th request of this user).
|
SessionId |
getSessionId() |
java.lang.String |
getTargetServer() |
int |
getTimeout()
Returns the timeout value (in seconds) of this request.
|
boolean |
isDisconnect() |
boolean |
isLogin() |
boolean |
isLogout() |
boolean |
isPing() |
boolean |
isSystemRequest()
Note that system requests are NOT delivered to the RequestThreadPool
but rather are executed directly by the calling thread without being queued.
|
void |
setPriority(int priority)
Sets the thread priority which is used to executed this agent
|
void |
setSessionId(SessionId ctx) |
void |
setTargetServer(java.lang.String targetServer) |
void |
setTimeout(int seconds)
Sets an individual timeout for this request (in seconds).
|
DumpString |
toDumpString(DumpString s)
This method allows subclasses to add values to the existing DumpString of the superclass.
|
ToString |
toString(ToString s)
This method allows subclasses to add values to the existing ToString of the superclass.
|
clone, deepClone
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString
public static final int DEFAULT_REQUEST_TIMEOUT
public NetRequest(NetCommand cmd)
public NetRequest(NetCommand cmd, java.lang.Object arg)
public java.lang.String getTargetServer()
public void setTargetServer(java.lang.String targetServer)
public void setSessionId(SessionId ctx)
public SessionId getSessionId()
public java.lang.Object getArgument()
public NetCommand getCommand()
public boolean isDisconnect()
public boolean isLogout()
public boolean isLogin()
public boolean isPing()
public boolean isSystemRequest()
public int getPriority()
public void setPriority(int priority)
public long getRequestId()
public static long getRequestCount()
public void setTimeout(int seconds)
public int getTimeout()
public NetResponse createResponse()
public NetResponse createErrorResponse(java.lang.Exception exc)
public java.lang.String getIdentifierString()
public ToString toString(ToString s)
Dumpable
toString
in interface Dumpable
toString
in class DumpableObject
public DumpString toDumpString(DumpString s)
Dumpable
toDumpString
in interface Dumpable
toDumpString
in class DumpableObject
Copyright © 2014 EsprIT-Systems. All Rights Reserved.