fr.dyade.aaa.jndi2.msg
Class IOControl

java.lang.Object
  extended by fr.dyade.aaa.jndi2.msg.IOControl

public class IOControl
extends java.lang.Object


Nested Class Summary
(package private) static class IOControl.NetOutputStream
           
 
Field Summary
private  java.io.BufferedInputStream bis
           
private  IOControl.NetOutputStream nos
           
private  java.net.Socket socket
           
static java.lang.String SOCKET_SOTIMEOUT
          This property allow to enable/disable SO_TIMEOUT with the specified timeout in milliseconds.
private static int socketTimeOut
          Enable/disable SO_TIMEOUT with the specified timeout in milliseconds.
 
Constructor Summary
IOControl(java.net.Socket socket)
           
 
Method Summary
 void close()
           
 java.net.Socket getSocket()
           
 int readInt()
           
 java.lang.Object readObject()
           
 void writeInt(int i)
           
 void writeObject(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOCKET_SOTIMEOUT

public static final java.lang.String SOCKET_SOTIMEOUT
This property allow to enable/disable SO_TIMEOUT with the specified timeout in milliseconds.

See Also:
Constant Field Values

socketTimeOut

private static int socketTimeOut
Enable/disable SO_TIMEOUT with the specified timeout in milliseconds. The default value is zero which means the option is disabled. This value can be adjusted by setting the environment property fr.dyade.aaa.jndi2.socketTimeOut. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time.


socket

private java.net.Socket socket

bis

private java.io.BufferedInputStream bis

nos

private IOControl.NetOutputStream nos
Constructor Detail

IOControl

public IOControl(java.net.Socket socket)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

readObject

public java.lang.Object readObject()
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readInt

public int readInt()
            throws java.io.IOException
Throws:
java.io.IOException

writeObject

public void writeObject(java.lang.Object obj)
                 throws java.io.IOException
Throws:
java.io.IOException

writeInt

public void writeInt(int i)
              throws java.io.IOException
Throws:
java.io.IOException

close

public void close()

getSocket

public final java.net.Socket getSocket()


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.