|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.http.Client | +--cebit.server.idm.socket.IDMSocketClient
Implements a Client (Connection handler) for Connections using the Identity manager. Its funktionality is almost the same as the http-SocketClient. The main addition to the basic SocketClient is, that this IDMSocketClient requests a new negotiation of security parameters before the reply is sent. Therefore the SSONETContext of this connection is added to the reply, when calling the method perform(request).
Field Summary | |
protected boolean |
alive
Is this client still alive ? |
protected int |
bindcount
Number of times this client was bound to a connection. |
protected cebit.server.idm.socket.SocketOutputBuffer |
bufout
Our reusable output buffer. |
protected idman.mngt.Context |
context
|
protected java.io.DataOutputStream |
dataOutputStream
|
protected boolean |
done
are we done? |
protected boolean |
idle
Are we idle (waiting for next request ?) |
protected boolean |
isContextRegistered
|
protected java.net.Socket |
socket
The socket currently handled by the client. |
(package private) cebit.server.idm.socket.IDMSocketClientState |
state
The client state for this client, has managed by the SocketClientFactory |
protected java.lang.Thread |
thread
The thread that we have been attached to. |
Fields inherited from class org.w3c.jigsaw.http.Client |
buffer, cont, debug, identifier, prev_body_count, reqcount, server |
Fields inherited from interface org.ssonet.net.ConnectionListener |
FINISHED_STATE, INIT_STATE, MECHANISMS_NEGOTIATION, NOT_STARTED_STATE, RUNNING_STATE, SECURITY_GOAL_NEGOTIATION |
Constructor Summary | |
IDMSocketClient(org.w3c.jigsaw.http.httpd server,
cebit.server.idm.socket.IDMSocketClientFactory pool,
cebit.server.idm.socket.IDMSocketClientState state)
Create an empty client, that will be ready to work. |
Method Summary | |
protected void |
bind(java.net.Socket socket)
SocketClientFactory interface - Bind the socket to this client. |
void |
connectionStateChanged(org.ssonet.net.SSONETContext context,
int currentState)
When the connection state has changed, this method reports the current state. |
void |
contextChanged(org.ssonet.net.SSONETContext c)
Notifies about context changes. |
boolean |
decideSecurityGoal(int securityGoal,
org.ssonet.net.ActionConfiguration ownConfiguration,
org.ssonet.net.SSONETContext context)
|
protected int |
emitReply(org.w3c.jigsaw.http.Reply reply)
Emit the given reply to the client. |
int |
getBindCount()
Get the total number of times this client was bound to a socket. |
idman.mngt.Context |
getContext()
|
java.net.InetAddress |
getInetAddress()
Client implementation - Get the IP address of this client. |
protected org.w3c.jigsaw.http.Request |
getNextRequest()
|
java.net.Socket |
getSocket()
|
protected java.lang.Thread |
getThread()
Get the thread powering that client. |
protected boolean |
idleConnection()
Client implementation - The current connection is idle. |
void |
join()
If this client is allocated a thread, join it. |
protected void |
kill(boolean now)
SocketClientFactory interface - Kill this client. |
void |
negotiationRequestReceived(org.ssonet.net.SSONETContext context,
int negotiationType)
|
void |
replaceContext(org.ssonet.net.SSONETContext o,
org.ssonet.net.SSONETContext n)
Method of SSONETContextListener. |
void |
run()
Run for our newly attached connection. |
protected void |
stopConnection()
Client implementation - This connection has been stopped. |
java.lang.String |
toString()
Print that client into a String. |
protected void |
unbind()
SocketClientFactory interface - Unbind this client. |
protected void |
usedConnection()
Client implementation - The current connection is in use. |
Methods inherited from class org.w3c.jigsaw.http.Client |
chunkTransfer, error, getIdentifier, getInputStream, getMajorVersion, getMinorVersion, getOutputStream, getRequestCount, getServer, handleTimerEvent, initialize, interruptConnection, isInterrupted, isRunning, log, processRequest, sendContinue, startConnection, trace, tryKeepConnection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.net.Socket socket
protected boolean alive
cebit.server.idm.socket.IDMSocketClientState state
protected int bindcount
protected java.lang.Thread thread
protected cebit.server.idm.socket.SocketOutputBuffer bufout
protected boolean idle
protected boolean done
protected idman.mngt.Context context
protected boolean isContextRegistered
protected java.io.DataOutputStream dataOutputStream
Constructor Detail |
public IDMSocketClient(org.w3c.jigsaw.http.httpd server, cebit.server.idm.socket.IDMSocketClientFactory pool, cebit.server.idm.socket.IDMSocketClientState state)
server
- The server to which this client is attached.pool
- The pool for reuse.state
- The state of this client.Method Detail |
protected int emitReply(org.w3c.jigsaw.http.Reply reply) throws java.io.IOException
emitReply
in class org.w3c.jigsaw.http.Client
reply
- The reply to be emited.
java.io.IOException
- If some IO error occurs.public java.lang.String toString()
SocketClient
.
toString
in class java.lang.Object
public void join()
public void run()
run
in interface java.lang.Runnable
public java.net.InetAddress getInetAddress()
getInetAddress
in class org.w3c.jigsaw.http.Client
protected void stopConnection()
stopConnection
in class org.w3c.jigsaw.http.Client
protected java.lang.Thread getThread()
getThread
in class org.w3c.jigsaw.http.Client
protected boolean idleConnection()
idleConnection
in class org.w3c.jigsaw.http.Client
protected void usedConnection()
usedConnection
in class org.w3c.jigsaw.http.Client
protected void bind(java.net.Socket socket)
socket
- The socket this client should now handle.protected void unbind()
protected void kill(boolean now)
public final int getBindCount()
protected org.w3c.jigsaw.http.Request getNextRequest() throws org.w3c.jigsaw.http.ClientException, java.io.IOException
getNextRequest
in class org.w3c.jigsaw.http.Client
org.w3c.jigsaw.http.ClientException
java.io.IOException
public void replaceContext(org.ssonet.net.SSONETContext o, org.ssonet.net.SSONETContext n)
replaceContext
in interface org.ssonet.net.SSONETContextListener
public void contextChanged(org.ssonet.net.SSONETContext c)
contextChanged
in interface org.ssonet.net.SSONETContextListener
public void connectionStateChanged(org.ssonet.net.SSONETContext context, int currentState)
connectionStateChanged
in interface org.ssonet.net.ConnectionListener
public java.net.Socket getSocket()
public idman.mngt.Context getContext()
public void negotiationRequestReceived(org.ssonet.net.SSONETContext context, int negotiationType)
negotiationRequestReceived
in interface org.ssonet.net.ConnectionListener
public boolean decideSecurityGoal(int securityGoal, org.ssonet.net.ActionConfiguration ownConfiguration, org.ssonet.net.SSONETContext context)
decideSecurityGoal
in interface org.ssonet.net.ConnectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |