|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.aselect.agent.handler.RequestHandler
public class RequestHandler
Main A-Select Agent API Request handler.
Description:
This class implements the A-Select Agent API for applications.
The A-Select Agent main accept loop spawns an instance of this class
for each incoming API request.
This class implements all the communication with the configured A-Select
Servers and uses the Session and Ticket managers to perform ticket en
session management.
Concurrency issues:
None.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected java.lang.String |
_sErrorCode
A-Select error state identifier. |
protected SystemLogger |
_systemLogger
Handle to SystemLogger. |
java.lang.String |
MODULE
The module name. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
RequestHandler(java.net.Socket oSocket,
IClientCommunicator oCommunicator,
boolean bAuthorization)
Initializes instance variables. |
Method Summary | |
---|---|
protected java.util.Hashtable |
deserializeAttributes(java.lang.String sSerializedAttributes)
Deserialize attributes and convertion to a Hashtable . |
IClientCommunicator |
getClientCommunicator()
Returns the ClientCommunicator. |
protected void |
processRequest(Communicator oCommunicator)
Main API request dispatch method. |
void |
run()
Main method for reading the request and processing it. |
protected java.util.Hashtable |
sendRequestToASelectServer(java.lang.String sUrl,
java.util.Hashtable htParamsTable)
Uses a IClientCommunicator to send a API call
to the A-Select server. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String MODULE
protected SystemLogger _systemLogger
protected java.lang.String _sErrorCode
Constructor Detail |
---|
public RequestHandler(java.net.Socket oSocket, IClientCommunicator oCommunicator, boolean bAuthorization)
oSocket
- socket to read and write to.oCommunicator
- ClientCommunicator
to use for communicating
with the A-Select Server.bAuthorization
- true
if authorization is enabled,
otherwise false
.Method Detail |
---|
public IClientCommunicator getClientCommunicator()
public void run()
processRequest
for processing.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void processRequest(Communicator oCommunicator)
authenticate
cross_authenticate
verify_credentials
verify_ticket
kill_ticket
set_authorization_rules
oCommunicator
- handle to Communicator
object for the request.protected java.util.Hashtable sendRequestToASelectServer(java.lang.String sUrl, java.util.Hashtable htParamsTable)
IClientCommunicator
to send a API call
to the A-Select server.
sUrl
- The A-Select Server URL.htParamsTable
- The parameters to send to A-Select.
Hashtable
.protected java.util.Hashtable deserializeAttributes(java.lang.String sSerializedAttributes) throws ASelectException
Hashtable
.
sSerializedAttributes
- the serialized attributes.
Hashtable
)
ASelectException
- If URLDecode fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |