Class horb.orb.BasicIOCI
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class horb.orb.BasicIOCI

java.lang.Object
   |
   +----horb.orb.IOCICommon
           |
           +----horb.orb.BasicIOCI

public class BasicIOCI
extends IOCICommon
implements IOCI
Basic implememtation of Inter-Object Communication Interface for TCP/IP. Programmers must use IOCIService interface to access IOCI related services. Don't access this class directly except some specific methods.

A subclass can inherit this class to make a new IOCI.

This uses java.io.DataOutputStream and java.io.DataInputStream for byte-order independent implementation. So this implementation is not fast.

See Also:

Variable Index

 o is
 o major_version
major version number
 o minor_version
minor version number
 o os
 o signature
0xBAC1 is the signature of BasicIOCI.

Constructor Index

 o BasicIOCI()

Method Index

 o available()
return number of bytes available without blocking.
 o connectServer(String, int)
 o finalize()
 o getAddress()
 o getHostName()
 o getInetAddress()
get client's IP address.
 o getLocalAddress()
 o getLocalHostName()
 o getLocalInetAddress()
 o getMajorVersion()
 o getMinorVersion()
 o getProperty(int, Object)
get property of BasicIOCI.
 o getSignature()
 o isConnected()
return true if connected.
 o kick()
 o recvBoolean()
 o recvBooleanArray()
 o recvByte()
 o recvByteArray()
 o recvChar()
 o recvCharArray()
 o recvConnectServer()
don't call this directly.
 o recvDouble()
 o recvDoubleArray()
 o recvFloat()
 o recvFloatArray()
 o recvInt()
 o recvIntArray()
 o recvLong()
 o recvLongArray()
 o recvObject(String, Goldberg)
 o recvShort()
 o recvShortArray()
 o recvString()
 o recvStringArray()
 o release()
 o sendBoolean(boolean)
 o sendBooleanArray(boolean[])
 o sendByte(byte)
 o sendByteArray(byte[])
 o sendChar(char)
 o sendCharArray(char[])
 o sendDouble(double)
 o sendDoubleArray(double[])
 o sendFloat(float)
 o sendFloatArray(float[])
 o sendInt(int)
 o sendIntArray(int[])
 o sendIOCISignature()
send signature of IOCI
 o sendLong(long)
 o sendLongArray(long[])
 o sendObject(Object, String, Loopy)
 o sendShort(short)
 o sendShortArray(short[])
 o sendString(String)
 o sendStringArray(String[])
 o serverAccept(int)
accept a connect request.
 o serverInit(int)
 o setProperty(int, Object)
set property of BasicIOCI.

Variables

 o major_version
  public final static short major_version
major version number
 o minor_version
  public final static short minor_version
minor version number
 o signature
  public final static short signature
0xBAC1 is the signature of BasicIOCI. Use another signature if you write another IOCI.
 o os
  public DataOutputStream os
 o is
  public DataInputStream is

Constructors

 o BasicIOCI
  public BasicIOCI()

Methods

 o getMajorVersion
  public short getMajorVersion()
 o getMinorVersion
  public short getMinorVersion()
 o getSignature
  public short getSignature()
 o setProperty
  public void setProperty(int request,
                          Object obj)
set property of BasicIOCI. Currently the common property requests listed in IOCIService are supported.
Overrides:
setProperty in class IOCICommon
 o getProperty
  public Object getProperty(int request,
                            Object obj)
get property of BasicIOCI. Currently the common property requests listed in IOCIService are supported.
Overrides:
getProperty in class IOCICommon
 o isConnected
  public synchronized boolean isConnected()
return true if connected. Don't rely on this method. This implementation always returns true unless the connection has been opened and not released.
Overrides:
isConnected in class IOCICommon
 o serverInit
  public void serverInit(int port) throws IOException
 o serverAccept
  public IOCI serverAccept(int port) throws IOException
accept a connect request. When new request comes, make a new IOCI and return it. Don't receive data from client in this method since this method from a main server thread that should not be blocked to receive data.
 o connectServer
  public void connectServer(String host,
                            int port) throws IOException
Overrides:
connectServer in class IOCICommon
 o sendIOCISignature
  public void sendIOCISignature() throws IOException
send signature of IOCI
Overrides:
sendIOCISignature in class IOCICommon
 o recvConnectServer
  public boolean recvConnectServer() throws IOException
don't call this directly.
 o getLocalHostName
  public String getLocalHostName() throws IOException
 o getLocalAddress
  public byte[] getLocalAddress() throws IOException
 o getLocalInetAddress
  public InetAddress getLocalInetAddress() throws IOException
 o getHostName
  public String getHostName()
 o getAddress
  public byte[] getAddress()
 o getInetAddress
  public InetAddress getInetAddress()
get client's IP address. BasicIOCI specific.
 o release
  public void release()
Overrides:
release in class IOCICommon
 o finalize
  public void finalize()
Overrides:
finalize in class Object
 o available
  public int available() throws IOException
return number of bytes available without blocking.
 o kick
  public void kick() throws IOException
Overrides:
kick in class IOCICommon
 o sendObject
  public void sendObject(Object o,
                         String expectedClassName,
                         Loopy loopy) throws HORBException, IOException, ProxyException
 o recvObject
  public Object recvObject(String expectedClassName,
                           Goldberg gb) throws HORBException, IOException, ProxyException
 o sendBoolean
  public void sendBoolean(boolean value) throws IOException
 o sendBooleanArray
  public void sendBooleanArray(boolean value[]) throws IOException
 o sendByte
  public void sendByte(byte value) throws IOException
Overrides:
sendByte in class IOCICommon
 o sendByteArray
  public void sendByteArray(byte value[]) throws IOException
 o sendChar
  public void sendChar(char value) throws IOException
 o sendCharArray
  public void sendCharArray(char value[]) throws IOException
 o sendShort
  public void sendShort(short value) throws IOException
Overrides:
sendShort in class IOCICommon
 o sendShortArray
  public void sendShortArray(short value[]) throws IOException
 o sendInt
  public void sendInt(int value) throws IOException
Overrides:
sendInt in class IOCICommon
 o sendIntArray
  public void sendIntArray(int value[]) throws IOException
 o sendLong
  public void sendLong(long value) throws IOException
 o sendLongArray
  public void sendLongArray(long value[]) throws IOException
 o sendFloat
  public void sendFloat(float value) throws IOException
 o sendFloatArray
  public void sendFloatArray(float value[]) throws IOException
 o sendDouble
  public void sendDouble(double value) throws IOException
 o sendDoubleArray
  public void sendDoubleArray(double value[]) throws IOException
 o sendString
  public void sendString(String value) throws IOException
Overrides:
sendString in class IOCICommon
 o sendStringArray
  public void sendStringArray(String value[]) throws IOException
 o recvBoolean
  public boolean recvBoolean() throws IOException
 o recvBooleanArray
  public boolean[] recvBooleanArray() throws IOException
 o recvByte
  public byte recvByte() throws IOException
Overrides:
recvByte in class IOCICommon
 o recvByteArray
  public byte[] recvByteArray() throws IOException
 o recvChar
  public char recvChar() throws IOException
 o recvCharArray
  public char[] recvCharArray() throws IOException
 o recvShort
  public short recvShort() throws IOException
Overrides:
recvShort in class IOCICommon
 o recvShortArray
  public short[] recvShortArray() throws IOException
 o recvInt
  public int recvInt() throws IOException
Overrides:
recvInt in class IOCICommon
 o recvIntArray
  public int[] recvIntArray() throws IOException
 o recvLong
  public long recvLong() throws IOException
 o recvLongArray
  public long[] recvLongArray() throws IOException
 o recvFloat
  public float recvFloat() throws IOException
 o recvFloatArray
  public float[] recvFloatArray() throws IOException
 o recvDouble
  public double recvDouble() throws IOException
 o recvDoubleArray
  public double[] recvDoubleArray() throws IOException
 o recvString
  public String recvString() throws IOException
Overrides:
recvString in class IOCICommon
 o recvStringArray
  public String[] recvStringArray() throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index