ch.ethz.iks.r_osgi.messages
Class LeaseUpdateMessage

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

public final class LeaseUpdateMessage
extends RemoteOSGiMessage

Lease update message. Sent whenever the information expressed in the original lease message has changed. This can be that either a service has been added/modified/removed, or that the topic space has changed.

Author:
Jan S. Rellermeyer, ETH Zurich

Field Summary
static short SERVICE_ADDED
          a service has been added.
static short SERVICE_MODIFIED
          a service has been modified.
static short SERVICE_REMOVED
          a service has been removed.
static short TOPIC_UPDATE
          the update is a topic update.
 
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
LeaseUpdateMessage()
          creates a new LeaseUpdateMessage for topic updates.
 
Method Summary
 java.lang.Object[] getPayload()
          get the payload of the message.
 java.lang.String getServiceID()
          get the service ID.
 short getType()
          get the type of the message.
 void setPayload(java.lang.Object[] payload)
          set the payload of the message.
 void setServiceID(java.lang.String serviceID)
          set the service ID.
 void setType(short type)
          set the type of the message.
 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

TOPIC_UPDATE

public static final short TOPIC_UPDATE
the update is a topic update.

See Also:
Constant Field Values

SERVICE_ADDED

public static final short SERVICE_ADDED
a service has been added.

See Also:
Constant Field Values

SERVICE_MODIFIED

public static final short SERVICE_MODIFIED
a service has been modified.

See Also:
Constant Field Values

SERVICE_REMOVED

public static final short SERVICE_REMOVED
a service has been removed.

See Also:
Constant Field Values
Constructor Detail

LeaseUpdateMessage

public LeaseUpdateMessage()
creates a new LeaseUpdateMessage for topic updates.

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.messages.RemoteOSGiMessage#getBody()

getType

public short getType()
get the type of the message.

Returns:
the type.

setType

public void setType(short type)
set the type of the message.

Parameters:
type - the type.

getServiceID

public java.lang.String getServiceID()
get the service ID.

Returns:
the service ID.

setServiceID

public void setServiceID(java.lang.String serviceID)
set the service ID.

Parameters:
serviceID - the service ID.

getPayload

public java.lang.Object[] getPayload()
get the payload of the message.

Returns:
the payload.

setPayload

public void setPayload(java.lang.Object[] payload)
set the payload of the message.

Parameters:
payload - the payload.

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.