unitee.common
Class UniteeProtocol

java.lang.Object
  |
  +--unitee.common.UniteeProtocol

public class UniteeProtocol
extends java.lang.Object

Defines the protocol constants used to interact with a UniteeServer , mostly to invoke remote methods.


Field Summary
static byte ARRAY
          The data is as follows.
static byte BOOLEAN
           
static byte CHARACTER
           
static byte CLASS
           
static java.lang.Class[] classes
           
static byte DISCONNECT
           
static byte DOUBLE
           
static byte EXCEPTION
           
static byte FLOAT
           
static byte INTEGER
           
static byte INVALID_REQUEST
           
static byte INVOKE_METHOD
           
static byte LONG
           
static byte METHOD_HASH
           
static byte METHOD_NAME
           
static byte METHOD_NOT_FOUND
           
static byte NULL
           
static byte OBJECT
           
static byte OBJECT_NOT_FOUND
           
static byte OK
           
static byte PRINT_STREAM
           
static byte SHORT
           
static byte STRING
           
static int UNITEE_SERVER_PORT
           
static byte VOID
           
 
Constructor Summary
UniteeProtocol()
           
 
Method Summary
static byte getClassIndex(java.lang.Class c)
           
static int getMethodHash(java.lang.reflect.Method method)
           
static boolean isPrimitive(java.lang.Class c)
           
static boolean isPrimitive(int classIndex)
           
static java.lang.Object readObject(java.io.DataInputStream input)
           
static java.lang.Object readObject(java.io.DataInputStream input, int classIndex, java.io.OutputStream clientOutputStream)
           
static Streamable readObject(java.io.DataInputStream input, Streamable s)
           
static StreamableArray readObject(java.io.DataInputStream input, StreamableArray array)
           
static void writeObject(java.io.DataOutputStream output, java.lang.Object value, java.lang.Class type, ObjectRepository repository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNITEE_SERVER_PORT

public static final int UNITEE_SERVER_PORT

INVOKE_METHOD

public static final byte INVOKE_METHOD

DISCONNECT

public static final byte DISCONNECT

METHOD_NAME

public static final byte METHOD_NAME

METHOD_HASH

public static final byte METHOD_HASH

CHARACTER

public static final byte CHARACTER

SHORT

public static final byte SHORT

BOOLEAN

public static final byte BOOLEAN

INTEGER

public static final byte INTEGER

LONG

public static final byte LONG

FLOAT

public static final byte FLOAT

DOUBLE

public static final byte DOUBLE

VOID

public static final byte VOID

STRING

public static final byte STRING

OBJECT

public static final byte OBJECT

PRINT_STREAM

public static final byte PRINT_STREAM

NULL

public static final byte NULL

ARRAY

public static final byte ARRAY
The data is as follows. 1 dimentional array: ... <3><12345><789><111> <3><12345><111> N dimentional array: ... <3><2><12345><789><111><12345><789><111>

CLASS

public static final byte CLASS

classes

public static final java.lang.Class[] classes

OK

public static final byte OK

INVALID_REQUEST

public static final byte INVALID_REQUEST

OBJECT_NOT_FOUND

public static final byte OBJECT_NOT_FOUND

METHOD_NOT_FOUND

public static final byte METHOD_NOT_FOUND

EXCEPTION

public static final byte EXCEPTION
Constructor Detail

UniteeProtocol

public UniteeProtocol()
Method Detail

isPrimitive

public static boolean isPrimitive(int classIndex)

isPrimitive

public static boolean isPrimitive(java.lang.Class c)

getClassIndex

public static byte getClassIndex(java.lang.Class c)

getMethodHash

public static int getMethodHash(java.lang.reflect.Method method)

writeObject

public static void writeObject(java.io.DataOutputStream output,
                               java.lang.Object value,
                               java.lang.Class type,
                               ObjectRepository repository)
                        throws java.io.IOException

readObject

public static StreamableArray readObject(java.io.DataInputStream input,
                                         StreamableArray array)
                                  throws java.io.IOException

readObject

public static Streamable readObject(java.io.DataInputStream input,
                                    Streamable s)
                             throws java.io.IOException

readObject

public static java.lang.Object readObject(java.io.DataInputStream input)
                                   throws java.io.IOException

readObject

public static java.lang.Object readObject(java.io.DataInputStream input,
                                          int classIndex,
                                          java.io.OutputStream clientOutputStream)
                                   throws java.io.IOException