|
||||||||||
| 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_SERVICE
type code for deliver service messages. |
static short |
FETCH_SERVICE
type code for fetch service messages. |
static short |
INVOKE_METHOD
type code for invoke method messages. |
static short |
LEASE
type code for lease messages. |
static short |
LEASE_UPDATE
type code for service attribute updates. |
static short |
METHOD_RESULT
type code for method result messages. |
static short |
REMOTE_EVENT
type code for remote event 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 short |
xid
the transaction id. |
| Method Summary | |
|---|---|
short |
getFuncID()
Get the function ID (type code) of the message. |
short |
getXID()
get the transaction ID. |
static RemoteOSGiMessage |
parse(ObjectInputStream input)
reads in a network packet and constructs the corresponding subtype of RemoteOSGiMessage from it. |
protected static byte[] |
readBytes(ObjectInputStream input)
reads the bytes encoded as SLP string. |
protected static String[] |
readStringArray(ObjectInputStream in)
read a string array. |
void |
send(ObjectOutputStream out)
write the RemoteOSGiMessage to an output stream. |
void |
setXID(short xid)
set the xid. |
protected abstract void |
writeBody(ObjectOutputStream output)
write the body of a RemoteOSGiMessage. |
protected static void |
writeBytes(ObjectOutputStream out,
byte[] bytes)
writes a byte array. |
protected static void |
writeStringArray(ObjectOutputStream out,
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 FETCH_SERVICE
public static final short DELIVER_SERVICE
public static final short DELIVER_BUNDLE
public static final short INVOKE_METHOD
public static final short METHOD_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
protected short xid
| Method Detail |
|---|
public final short getXID()
ch.ethz.iks.r_osgi.RemoteOSGiMessage#getXID()public void setXID(short xid)
xid - set the xid.public final short getFuncID()
ch.ethz.iks.r_osgi.RemoteOSGiMessage#getFuncID()
public static RemoteOSGiMessage parse(ObjectInputStream input)
throws IOException
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.
SocketException - if something goes wrong.
IOException
public final void send(ObjectOutputStream out)
throws IOException
out - the ObjectOutputStream.
IOException - in case of IO failures.
protected abstract void writeBody(ObjectOutputStream output)
throws IOException
output - the output stream.
IOException - in case of IO failures.
protected static byte[] readBytes(ObjectInputStream input)
throws IOException
input - the DataInput.
IOException - in case of IO failures.
protected static void writeBytes(ObjectOutputStream out,
byte[] bytes)
throws IOException
out - the output stream.bytes - the bytes.
IOException - in case of IO failures.
protected static void writeStringArray(ObjectOutputStream out,
String[] strings)
throws IOException
out - the output stream.strings - the string array.
IOException - in case of IO failures.
protected static String[] readStringArray(ObjectInputStream in)
throws IOException
in - the input stream
IOException - in case of IO failures.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||