uka.transport
Class MarshalContext

java.lang.Object
  extended byuka.transport.MarshalContext

public abstract class MarshalContext
extends java.lang.Object

Author:
Bernhard Haumacher

Field Summary
private  boolean objectsReceived
           
private  boolean objectsSent
           
private  UnmarshalStream rcv
           
private  byte[] rcvBuffer
           
private  int rcvPos
           
private  MarshalStream snd
           
private  byte[] sndBuffer
           
private  int sndPos
           
 
Constructor Summary
MarshalContext(MarshalStream snd, UnmarshalStream rcv)
           
 
Method Summary
 boolean areObjectsReceived()
           
 boolean areObjectsSent()
           
 void close()
           
 void closeReceivePrimitive(int primLength)
           
 void closeSendPrimitive(int primLength)
           
 void flush()
           
 MarshalStream getMarshalStream()
          Patch distribution requires a marshal stream.
 UnmarshalStream getUnmarshalStream()
          Patch distribution requires a marshal stream.
 void openReceivePrimitive(int primLength)
           
 void openSendPrimitive(int primLength)
           
 boolean receiveBoolean()
           
 byte receiveByte()
           
 char receiveChar()
           
 double receiveDouble()
           
 float receiveFloat()
           
 int receiveInt()
           
 long receiveLong()
           
 java.lang.Object receiveObject()
           
 short receiveShort()
           
 boolean receiveSingleBoolean()
           
 byte receiveSingleByte()
           
 char receiveSingleChar()
           
 double receiveSingleDouble()
           
 float receiveSingleFloat()
           
 int receiveSingleInt()
           
 long receiveSingleLong()
           
 short receiveSingleShort()
           
 void resetReceive()
           
 void resetSend()
           
 void sendBoolean(boolean value)
           
 void sendByte(byte value)
           
 void sendChar(char value)
           
 void sendDouble(double value)
           
 void sendFloat(float value)
           
 void sendInt(int value)
           
 void sendLong(long value)
           
 void sendObject(java.lang.Object value)
           
 void sendShort(short value)
           
 void sendSingleBoolean(boolean value)
           
 void sendSingleByte(byte value)
           
 void sendSingleChar(char value)
           
 void sendSingleDouble(double value)
           
 void sendSingleFloat(float value)
           
 void sendSingleInt(int value)
           
 void sendSingleLong(long value)
           
 void sendSingleShort(short value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snd

private MarshalStream snd

sndPos

private int sndPos

sndBuffer

private byte[] sndBuffer

objectsSent

private boolean objectsSent

rcv

private UnmarshalStream rcv

rcvPos

private int rcvPos

rcvBuffer

private byte[] rcvBuffer

objectsReceived

private boolean objectsReceived
Constructor Detail

MarshalContext

public MarshalContext(MarshalStream snd,
                      UnmarshalStream rcv)
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getMarshalStream

public MarshalStream getMarshalStream()
Patch distribution requires a marshal stream.

See Also:
ReplicatedServerRef

getUnmarshalStream

public UnmarshalStream getUnmarshalStream()
Patch distribution requires a marshal stream.

See Also:
ReplicatedServerRef

openSendPrimitive

public final void openSendPrimitive(int primLength)
                             throws java.io.IOException
Throws:
java.io.IOException

closeSendPrimitive

public final void closeSendPrimitive(int primLength)
                              throws java.io.IOException
Throws:
java.io.IOException

sendObject

public final void sendObject(java.lang.Object value)
                      throws java.io.IOException
Throws:
java.io.IOException

openReceivePrimitive

public final void openReceivePrimitive(int primLength)
                                throws java.io.IOException
Throws:
java.io.IOException

closeReceivePrimitive

public final void closeReceivePrimitive(int primLength)
                                 throws java.io.IOException
Throws:
java.io.IOException

receiveObject

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

sendSingleBoolean

public final void sendSingleBoolean(boolean value)
                             throws java.io.IOException
Throws:
java.io.IOException

receiveSingleBoolean

public final boolean receiveSingleBoolean()
                                   throws java.io.IOException
Throws:
java.io.IOException

sendBoolean

public final void sendBoolean(boolean value)

receiveBoolean

public final boolean receiveBoolean()

sendSingleByte

public final void sendSingleByte(byte value)
                          throws java.io.IOException
Throws:
java.io.IOException

receiveSingleByte

public final byte receiveSingleByte()
                             throws java.io.IOException
Throws:
java.io.IOException

sendByte

public final void sendByte(byte value)

receiveByte

public final byte receiveByte()

sendSingleChar

public final void sendSingleChar(char value)
                          throws java.io.IOException
Throws:
java.io.IOException

receiveSingleChar

public final char receiveSingleChar()
                             throws java.io.IOException
Throws:
java.io.IOException

sendChar

public final void sendChar(char value)

receiveChar

public final char receiveChar()

sendSingleShort

public final void sendSingleShort(short value)
                           throws java.io.IOException
Throws:
java.io.IOException

receiveSingleShort

public final short receiveSingleShort()
                               throws java.io.IOException
Throws:
java.io.IOException

sendShort

public final void sendShort(short value)

receiveShort

public final short receiveShort()

sendSingleInt

public final void sendSingleInt(int value)
                         throws java.io.IOException
Throws:
java.io.IOException

receiveSingleInt

public final int receiveSingleInt()
                           throws java.io.IOException
Throws:
java.io.IOException

sendInt

public final void sendInt(int value)

receiveInt

public final int receiveInt()

sendSingleLong

public final void sendSingleLong(long value)
                          throws java.io.IOException
Throws:
java.io.IOException

receiveSingleLong

public final long receiveSingleLong()
                             throws java.io.IOException
Throws:
java.io.IOException

sendLong

public final void sendLong(long value)

receiveLong

public final long receiveLong()

sendSingleFloat

public final void sendSingleFloat(float value)
                           throws java.io.IOException
Throws:
java.io.IOException

receiveSingleFloat

public final float receiveSingleFloat()
                               throws java.io.IOException
Throws:
java.io.IOException

sendFloat

public final void sendFloat(float value)

receiveFloat

public final float receiveFloat()

sendSingleDouble

public final void sendSingleDouble(double value)
                            throws java.io.IOException
Throws:
java.io.IOException

receiveSingleDouble

public final double receiveSingleDouble()
                                 throws java.io.IOException
Throws:
java.io.IOException

sendDouble

public final void sendDouble(double value)

receiveDouble

public final double receiveDouble()

flush

public final void flush()
                 throws java.io.IOException
Throws:
java.io.IOException

resetSend

public final void resetSend()
                     throws java.io.IOException
Throws:
java.io.IOException

areObjectsSent

public final boolean areObjectsSent()

resetReceive

public final void resetReceive()
                        throws java.io.IOException
Throws:
java.io.IOException

areObjectsReceived

public final boolean areObjectsReceived()