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:
-
-
is
-
-
major_version
- major version number
-
minor_version
- minor version number
-
os
-
-
signature
- 0xBAC1 is the signature of BasicIOCI.
-
BasicIOCI()
-
-
available()
- return number of bytes available without blocking.
-
connectServer(String, int)
-
-
finalize()
-
-
getAddress()
-
-
getHostName()
-
-
getInetAddress()
- get client's IP address.
-
getLocalAddress()
-
-
getLocalHostName()
-
-
getLocalInetAddress()
-
-
getMajorVersion()
-
-
getMinorVersion()
-
-
getProperty(int, Object)
- get property of BasicIOCI.
-
getSignature()
-
-
isConnected()
- return true if connected.
-
kick()
-
-
recvBoolean()
-
-
recvBooleanArray()
-
-
recvByte()
-
-
recvByteArray()
-
-
recvChar()
-
-
recvCharArray()
-
-
recvConnectServer()
- don't call this directly.
-
recvDouble()
-
-
recvDoubleArray()
-
-
recvFloat()
-
-
recvFloatArray()
-
-
recvInt()
-
-
recvIntArray()
-
-
recvLong()
-
-
recvLongArray()
-
-
recvObject(String, Goldberg)
-
-
recvShort()
-
-
recvShortArray()
-
-
recvString()
-
-
recvStringArray()
-
-
release()
-
-
sendBoolean(boolean)
-
-
sendBooleanArray(boolean[])
-
-
sendByte(byte)
-
-
sendByteArray(byte[])
-
-
sendChar(char)
-
-
sendCharArray(char[])
-
-
sendDouble(double)
-
-
sendDoubleArray(double[])
-
-
sendFloat(float)
-
-
sendFloatArray(float[])
-
-
sendInt(int)
-
-
sendIntArray(int[])
-
-
sendIOCISignature()
- send signature of IOCI
-
sendLong(long)
-
-
sendLongArray(long[])
-
-
sendObject(Object, String, Loopy)
-
-
sendShort(short)
-
-
sendShortArray(short[])
-
-
sendString(String)
-
-
sendStringArray(String[])
-
-
serverAccept(int)
- accept a connect request.
-
serverInit(int)
-
-
setProperty(int, Object)
- set property of BasicIOCI.
major_version
public final static short major_version
- major version number
minor_version
public final static short minor_version
- minor version number
signature
public final static short signature
- 0xBAC1 is the signature of BasicIOCI. Use another signature if you write
another IOCI.
os
public DataOutputStream os
is
public DataInputStream is
BasicIOCI
public BasicIOCI()
getMajorVersion
public short getMajorVersion()
getMinorVersion
public short getMinorVersion()
getSignature
public short getSignature()
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
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
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
serverInit
public void serverInit(int port) throws IOException
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.
connectServer
public void connectServer(String host,
int port) throws IOException
- Overrides:
- connectServer in class IOCICommon
sendIOCISignature
public void sendIOCISignature() throws IOException
- send signature of IOCI
- Overrides:
- sendIOCISignature in class IOCICommon
recvConnectServer
public boolean recvConnectServer() throws IOException
- don't call this directly.
getLocalHostName
public String getLocalHostName() throws IOException
getLocalAddress
public byte[] getLocalAddress() throws IOException
getLocalInetAddress
public InetAddress getLocalInetAddress() throws IOException
getHostName
public String getHostName()
getAddress
public byte[] getAddress()
getInetAddress
public InetAddress getInetAddress()
- get client's IP address. BasicIOCI specific.
release
public void release()
- Overrides:
- release in class IOCICommon
finalize
public void finalize()
- Overrides:
- finalize in class Object
available
public int available() throws IOException
- return number of bytes available without blocking.
kick
public void kick() throws IOException
- Overrides:
- kick in class IOCICommon
sendObject
public void sendObject(Object o,
String expectedClassName,
Loopy loopy) throws HORBException, IOException, ProxyException
recvObject
public Object recvObject(String expectedClassName,
Goldberg gb) throws HORBException, IOException, ProxyException
sendBoolean
public void sendBoolean(boolean value) throws IOException
sendBooleanArray
public void sendBooleanArray(boolean value[]) throws IOException
sendByte
public void sendByte(byte value) throws IOException
- Overrides:
- sendByte in class IOCICommon
sendByteArray
public void sendByteArray(byte value[]) throws IOException
sendChar
public void sendChar(char value) throws IOException
sendCharArray
public void sendCharArray(char value[]) throws IOException
sendShort
public void sendShort(short value) throws IOException
- Overrides:
- sendShort in class IOCICommon
sendShortArray
public void sendShortArray(short value[]) throws IOException
sendInt
public void sendInt(int value) throws IOException
- Overrides:
- sendInt in class IOCICommon
sendIntArray
public void sendIntArray(int value[]) throws IOException
sendLong
public void sendLong(long value) throws IOException
sendLongArray
public void sendLongArray(long value[]) throws IOException
sendFloat
public void sendFloat(float value) throws IOException
sendFloatArray
public void sendFloatArray(float value[]) throws IOException
sendDouble
public void sendDouble(double value) throws IOException
sendDoubleArray
public void sendDoubleArray(double value[]) throws IOException
sendString
public void sendString(String value) throws IOException
- Overrides:
- sendString in class IOCICommon
sendStringArray
public void sendStringArray(String value[]) throws IOException
recvBoolean
public boolean recvBoolean() throws IOException
recvBooleanArray
public boolean[] recvBooleanArray() throws IOException
recvByte
public byte recvByte() throws IOException
- Overrides:
- recvByte in class IOCICommon
recvByteArray
public byte[] recvByteArray() throws IOException
recvChar
public char recvChar() throws IOException
recvCharArray
public char[] recvCharArray() throws IOException
recvShort
public short recvShort() throws IOException
- Overrides:
- recvShort in class IOCICommon
recvShortArray
public short[] recvShortArray() throws IOException
recvInt
public int recvInt() throws IOException
- Overrides:
- recvInt in class IOCICommon
recvIntArray
public int[] recvIntArray() throws IOException
recvLong
public long recvLong() throws IOException
recvLongArray
public long[] recvLongArray() throws IOException
recvFloat
public float recvFloat() throws IOException
recvFloatArray
public float[] recvFloatArray() throws IOException
recvDouble
public double recvDouble() throws IOException
recvDoubleArray
public double[] recvDoubleArray() throws IOException
recvString
public String recvString() throws IOException
- Overrides:
- recvString in class IOCICommon
recvStringArray
public String[] recvStringArray() throws IOException
All Packages Class Hierarchy This Package Previous Next Index