|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.ethz.iks.r_osgi.messages.RemoteOSGiMessage
public abstract class RemoteOSGiMessage
Abstract base class for all Messages.
Field Summary | |
---|---|
static short |
DELIVER_BUNDLE
Deprecated. |
static short |
DELIVER_BUNDLES
type code for deliver bundles message |
static short |
DELIVER_SERVICE
type code for deliver service messages. |
static short |
LEASE
type code for lease messages. |
static short |
LEASE_UPDATE
type code for service attribute updates. |
static short |
REMOTE_CALL
type code for invoke method messages. |
static short |
REMOTE_CALL_RESULT
type code for method result messages. |
static short |
REMOTE_EVENT
type code for remote event messages. |
static short |
REQUEST_BUNDLE
type code for request bundle message |
static short |
REQUEST_DEPENDENCIES
type code for request dependency message. |
static short |
REQUEST_SERVICE
type code for fetch service messages. |
static short |
STREAM_REQUEST
type code for stream request messages. |
static short |
STREAM_RESULT
type code for stream result messages. |
static short |
TIME_OFFSET
type code for time offset messages. |
protected int |
xid
the transaction id. |
Method Summary | |
---|---|
short |
getFuncID()
Get the function ID (type code) of the message. |
int |
getXID()
get the transaction ID. |
static RemoteOSGiMessage |
parse(java.io.ObjectInputStream input)
reads in a network packet and constructs the corresponding subtype of RemoteOSGiMessage from it. |
protected static byte[] |
readBytes(java.io.ObjectInputStream input)
reads the bytes encoded as SLP string. |
protected static java.lang.String[] |
readStringArray(java.io.ObjectInputStream in)
read a string array. |
void |
send(java.io.ObjectOutputStream out)
write the RemoteOSGiMessage to an output stream. |
void |
setXID(int xid)
set the xid. |
protected abstract void |
writeBody(java.io.ObjectOutputStream output)
write the body of a RemoteOSGiMessage. |
protected static void |
writeBytes(java.io.ObjectOutputStream out,
byte[] bytes)
writes a byte array. |
protected static void |
writeStringArray(java.io.ObjectOutputStream out,
java.lang.String[] strings)
write a string array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short LEASE
public static final short REQUEST_SERVICE
public static final short DELIVER_SERVICE
public static final short DELIVER_BUNDLE
public static final short REMOTE_CALL
public static final short REMOTE_CALL_RESULT
public static final short REMOTE_EVENT
public static final short TIME_OFFSET
public static final short LEASE_UPDATE
public static final short STREAM_REQUEST
public static final short STREAM_RESULT
public static final short REQUEST_DEPENDENCIES
public static final short REQUEST_BUNDLE
public static final short DELIVER_BUNDLES
protected int xid
Method Detail |
---|
public final int getXID()
ch.ethz.iks.r_osgi.RemoteOSGiMessage#getXID()
public void setXID(int xid)
xid
- set the xid.public final short getFuncID()
ch.ethz.iks.r_osgi.RemoteOSGiMessage#getFuncID()
public static RemoteOSGiMessage parse(java.io.ObjectInputStream input) throws java.io.IOException, java.lang.ClassNotFoundException
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Function-ID | XID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | XID cntd. | +-+-+-+-+-+-+-+-+the body is processed by the subtype class.
input
- the DataInput providing the network packet.
java.lang.ClassNotFoundException
java.net.SocketException
- if something goes wrong.
java.io.IOException
public final void send(java.io.ObjectOutputStream out) throws java.io.IOException
out
- the ObjectOutputStream.
java.io.IOException
- in case of IO failures.protected abstract void writeBody(java.io.ObjectOutputStream output) throws java.io.IOException
output
- the output stream.
java.io.IOException
- in case of IO failures.protected static byte[] readBytes(java.io.ObjectInputStream input) throws java.io.IOException
input
- the DataInput.
java.io.IOException
- in case of IO failures.protected static void writeBytes(java.io.ObjectOutputStream out, byte[] bytes) throws java.io.IOException
out
- the output stream.bytes
- the bytes.
java.io.IOException
- in case of IO failures.protected static void writeStringArray(java.io.ObjectOutputStream out, java.lang.String[] strings) throws java.io.IOException
out
- the output stream.strings
- the string array.
java.io.IOException
- in case of IO failures.protected static java.lang.String[] readStringArray(java.io.ObjectInputStream in) throws java.io.IOException
in
- the input stream
java.io.IOException
- in case of IO failures.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |