ch.ethz.iks.r_osgi.messages
Class StreamRequestMessage

java.lang.Object
  extended by ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage
      extended by ch.ethz.iks.r_osgi.messages.StreamRequestMessage

public final class StreamRequestMessage
extends RemoteOSGiMessage

Stream request message.

Author:
Michael Duller, ETH Zurich.

Field Summary
static byte READ
          operation identifier for simple read operation on stream.
static byte READ_ARRAY
          operation identifier for read operation reading more than one byte at once.
static byte WRITE
          operation identifier for simple write operation on stream.
static byte WRITE_ARRAY
          operation identifier for write operation writing more than one byte at once.
 
Fields inherited from class ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage
DELIVER_BUNDLE, DELIVER_BUNDLES, DELIVER_SERVICE, LEASE, LEASE_UPDATE, REMOTE_CALL, REMOTE_CALL_RESULT, REMOTE_EVENT, REQUEST_BUNDLE, REQUEST_DEPENDENCIES, REQUEST_SERVICE, STREAM_REQUEST, STREAM_RESULT, TIME_OFFSET, xid
 
Constructor Summary
StreamRequestMessage()
          creates a new StreamRequestMessage.
 
Method Summary
 byte[] getData()
          get the data array.
 int getLenOrVal()
          get the length (read op) or value (write op) field.
 byte getOp()
          get the operation code.
 short getStreamID()
          get the ID of the stream.
 void setData(byte[] b)
          set the data array.
 void setLenOrVal(int lenOrVal)
          set the length (read op) or value (write op) field.
 void setOp(byte op)
          set the operation code.
 void setStreamID(short streamID)
          set the ID of the stream.
 java.lang.String toString()
          String representation for debug outputs.
 void writeBody(java.io.ObjectOutputStream out)
          write the body of the message to a stream.
 
Methods inherited from class ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage
getFuncID, getXID, parse, readBytes, readStringArray, send, setXID, writeBytes, writeStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ

public static final byte READ
operation identifier for simple read operation on stream.

See Also:
Constant Field Values

READ_ARRAY

public static final byte READ_ARRAY
operation identifier for read operation reading more than one byte at once.

See Also:
Constant Field Values

WRITE

public static final byte WRITE
operation identifier for simple write operation on stream.

See Also:
Constant Field Values

WRITE_ARRAY

public static final byte WRITE_ARRAY
operation identifier for write operation writing more than one byte at once.

See Also:
Constant Field Values
Constructor Detail

StreamRequestMessage

public StreamRequestMessage()
creates a new StreamRequestMessage.

Method Detail

writeBody

public void writeBody(java.io.ObjectOutputStream out)
               throws java.io.IOException
write the body of the message to a stream.

Specified by:
writeBody in class RemoteOSGiMessage
Parameters:
out - the ObjectOutputStream.
Throws:
java.io.IOException - in case of IO failures.
See Also:
ch.ethz.iks.r_osgi.impl.RemoteOSGiMessageImpl#getBody()

getStreamID

public short getStreamID()
get the ID of the stream.

Returns:
the ID of the stream.

setStreamID

public void setStreamID(short streamID)
set the ID of the stream.

Parameters:
streamID - the ID of the stream.

getOp

public byte getOp()
get the operation code.

Returns:
the operation code.

setOp

public void setOp(byte op)
set the operation code.

Parameters:
op - the operation code.

getLenOrVal

public int getLenOrVal()
get the length (read op) or value (write op) field.

Returns:
the length or value.

setLenOrVal

public void setLenOrVal(int lenOrVal)
set the length (read op) or value (write op) field.

Parameters:
lenOrVal - the length or value.

getData

public byte[] getData()
get the data array.

Returns:
the data array.

setData

public void setData(byte[] b)
set the data array.

Parameters:
b - the data array to store.

toString

public java.lang.String toString()
String representation for debug outputs.

Overrides:
toString in class java.lang.Object
Returns:
a string representation.
See Also:
Object.toString()


Copyright © 2009 IKS, ETH Zurich. All Rights Reserved.