com.ibm.maf.atp
Class ConnectionHandler
java.lang.Object
java.lang.Thread
com.ibm.maf.atp.ConnectionHandler
- All Implemented Interfaces:
- AtpConstants, java.lang.Runnable
- final class ConnectionHandler
- extends java.lang.Thread
- implements AtpConstants
- Version:
- 1.10 $Date: 2001/07/28 06:31:34 $
- Author:
- Danny D. Langue, Gaku Yamamoto, Mitsuru Oshima
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface com.ibm.atp.AtpConstants |
ATCI_REQUEST, ATCI_RESPONSE, AUTHENTICATION_MANNER_DIGEST, AUTHENTICATION_MANNER_SIGNATURE, BAD_GATEWAY, BAD_REQUEST, DISPATCH, EXCEPTION, FETCH, FORBIDDEN, FUTURE, HANDLED, ILLEGAL_REQUEST, INTERNAL_ERROR, MAX_REQUEST_TYPE, MESSAGE, MOVED, NO_AUTHENTICATION_MANNER, NOT_AUTHENTICATED, NOT_FOUND, NOT_HANDLED, NOT_IMPLEMENTED, OKAY, ONEWAY, PING, REPLY, REQUEST_TYPE_BASE, RETRACT, SERVICE_UNAVAILABLE, SYNC |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MESSAGE_DIGEST_ALGORITHM
private static final java.lang.String MESSAGE_DIGEST_ALGORITHM
- message digest algorithm.
- See Also:
- Constant Field Values
_mdigest
private static java.security.MessageDigest _mdigest
_maf
private MAFAgentSystem _maf
_serversocket
private java.net.ServerSocket _serversocket
_connection
private java.net.Socket _connection
_auth
private Authentication _auth
_authenticated
private boolean _authenticated
group
private static java.lang.ThreadGroup group
BUFFSIZE
private static int BUFFSIZE
number
private static int number
authentication
private static boolean authentication
max_handlers
private static int max_handlers
num_handlers
private static int num_handlers
idle_handlers
private static int idle_handlers
http_tunneling
static boolean http_tunneling
http_messaging
static boolean http_messaging
headers
private java.util.Hashtable headers
future_reply
byte[] future_reply
CRLF
private static final java.lang.String CRLF
- See Also:
- Constant Field Values
ConnectionHandler
public ConnectionHandler(MAFAgentSystem maf,
java.net.ServerSocket s)
calculateMIC
static byte[] calculateMIC(SharedSecret secret,
byte[] agent)
dumpBytes
private static void dumpBytes(byte[] bytes)
equalsSeq
private static boolean equalsSeq(byte[] seqa,
byte[] seqb)
getMIC
private static byte[] getMIC(AtpRequest request)
handle
private void handle()
throws java.io.IOException
- Throws:
java.io.IOException
handleDispatchRequest
protected void handleDispatchRequest(AtpRequest request,
AtpResponse response)
throws java.io.IOException
- Handles Dispatch Requests
- Throws:
java.io.IOException
handleFetchRequest
protected void handleFetchRequest(AtpRequest request,
AtpResponse response)
throws java.io.IOException
- Handles fetch requests.
- Parameters:
request - response -
- Throws:
java.io.IOException
handleMessageRequest
protected void handleMessageRequest(AtpRequest request,
AtpResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
handleRequest
void handleRequest(AtpRequest request,
AtpResponse response)
throws java.io.IOException
- Handle ATP Requests
- Throws:
java.io.IOException
handleRetractRequest
protected void handleRetractRequest(AtpRequest request,
AtpResponse response)
throws java.io.IOException
- Handles retract requests.
- Parameters:
request - response -
- Throws:
java.io.IOException
run
public void run()
- Specified by:
run in interface java.lang.Runnable
sendFutureReply
void sendFutureReply(byte[] b)
sendHttpResponse
private void sendHttpResponse()
throws java.io.IOException
- Throws:
java.io.IOException
toString
public java.lang.String toString()
update
public static void update()
verboseOut
private static void verboseOut(java.lang.String msg)
verifyMIC
static boolean verifyMIC(byte[] mic,
SharedSecret secret,
byte[] agent)