|
||||||||||
| 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_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 | |
|---|---|
TimeOffsetMessage()
creates a new empty TimeSyncMessage. |
|
TimeOffsetMessage(java.io.ObjectInputStream input)
creates a new TimeSyncMessage from network packet: 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[] \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . |
|
| Method Summary | |
|---|---|
long[] |
getTimeSeries()
returns the time series. |
void |
restamp(int 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. |
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 |
| Constructor Detail |
|---|
public TimeOffsetMessage()
public TimeOffsetMessage(java.io.ObjectInputStream input)
throws java.io.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.
java.io.IOException - in case of IO failures.| Method Detail |
|---|
public void writeBody(java.io.ObjectOutputStream out)
throws java.io.IOException
writeBody in class RemoteOSGiMessageout - the ObjectOutputStream.
java.io.IOException - in case of IO failures.ch.ethz.iks.r_osgi.messages.RemoteOSGiMessage#getBody()public void timestamp()
public void restamp(int newXID)
public final long[] getTimeSeries()
long array.public final void setTimeSeries(long[] series)
series - the time series.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||