org.objectweb.dream.channel
Class SocketStateImpl

java.lang.Object
  extended byorg.objectweb.dream.channel.SocketStateImpl
All Implemented Interfaces:
CodecInputOutput, Recyclable, SocketState

public class SocketStateImpl
extends Object
implements SocketState

Basic implementation of SocketState.


Field Summary
protected  Object input
           
protected  Object output
           
protected  Socket socket
           
 
Constructor Summary
SocketStateImpl()
           
 
Method Summary
 void close()
          Closes the connection.
 Object getInput()
           
 Object getOutput()
           
 boolean isClosed()
          Returns true if the socket is closed or is deconnected.
 void recycle()
          WARNING : The socket state must be previously closed.
 void setInput(Object input)
           
 void setOutput(Object output)
           
 void setSocket(Socket socket)
          Sets the socket to be used as input and output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected Socket socket

input

protected Object input

output

protected Object output
Constructor Detail

SocketStateImpl

public SocketStateImpl()
Method Detail

setSocket

public void setSocket(Socket socket)
Description copied from interface: SocketState
Sets the socket to be used as input and output.

Specified by:
setSocket in interface SocketState
Parameters:
socket - a socket.
See Also:
SocketState.setSocket(Socket)

getInput

public Object getInput()
                throws IOException
Specified by:
getInput in interface CodecInputOutput
Throws:
IOException
See Also:
CodecInputOutput.getInput()

setInput

public void setInput(Object input)
Specified by:
setInput in interface CodecInputOutput
See Also:
CodecInputOutput.setInput(Object)

getOutput

public Object getOutput()
                 throws IOException
Specified by:
getOutput in interface CodecInputOutput
Throws:
IOException
See Also:
CodecInputOutput.getOutput()

setOutput

public void setOutput(Object output)
Specified by:
setOutput in interface CodecInputOutput
See Also:
CodecInputOutput.setOutput(Object)

isClosed

public boolean isClosed()
Description copied from interface: SocketState
Returns true if the socket is closed or is deconnected.

Specified by:
isClosed in interface SocketState
Returns:
true if the socket is closed or is deconnected.
See Also:
SocketState.isClosed()

close

public void close()
Description copied from interface: SocketState
Closes the connection.

Specified by:
close in interface SocketState
See Also:
SocketState.close()

recycle

public void recycle()
WARNING : The socket state must be previously closed.

Specified by:
recycle in interface Recyclable
See Also:
Recyclable.recycle()


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.