|
||||||||||
| 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
ch.ethz.iks.r_osgi.messages.TimeOffsetMessage
public final class TimeOffsetMessage
TimeOffsetMessages measures the time offset between two peers.
| Field Summary |
|---|
| Fields inherited from class ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage |
|---|
DELIVER_BUNDLE, DELIVER_SERVICE, FETCH_SERVICE, INVOKE_METHOD, LEASE, LEASE_UPDATE, METHOD_RESULT, REMOTE_EVENT, STREAM_REQUEST, STREAM_RESULT, TIME_OFFSET, xid |
| Constructor Summary | |
|---|---|
TimeOffsetMessage()
creates a new empty TimeSyncMessage. |
|
TimeOffsetMessage(ObjectInputStream input)
creates a new TimeSyncMessage from network packet: |
|
| Method Summary | |
|---|---|
long[] |
getTimeSeries()
returns the time series. |
void |
restamp(short newXID)
for retransmissions: replace the last timestamp with the current one. |
void |
setTimeSeries(long[] series)
set the time series. |
void |
timestamp()
add the current time to the time series. |
String |
toString()
String representation for debug outputs. |
void |
writeBody(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 |
| Constructor Detail |
|---|
public TimeOffsetMessage()
public TimeOffsetMessage(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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| R-OSGi header (function = TimeOffset = 7) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Marshalled Long[] \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.
input - an ObjectInputStream that provides the body of
a R-OSGi network packet.
IOException - in case of IO failures.| Method Detail |
|---|
public void writeBody(ObjectOutputStream out)
throws IOException
writeBody in class RemoteOSGiMessageout - the ObjectOutputStream.
IOException - in case of IO failures.ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage#getBody()public void timestamp()
public void restamp(short newXID)
public final long[] getTimeSeries()
long array.public final void setTimeSeries(long[] series)
series - the time series.public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||