org.iperg.part.core
Class IpObjectEvent

java.lang.Object
  extended by org.iperg.part.core.IpEvent
      extended by org.iperg.part.core.IpObjectEvent

public class IpObjectEvent
extends IpEvent

IpObjectEvent events are generated to notify the application about changes to replicated objects. This includes the addition and removal of such objects, or updates to object properties.

Version:
1.0.0 Initial version
Author:
Olov Stahl - olovs@sics.se

Field Summary
static java.lang.String PROP_ADD
          An event type that indicates that a new property has been added to an object.
static java.lang.String PROP_REMOVE
          An event type that indicates that a property has been removed from an object.
static java.lang.String PROP_UPDATE
          An event type that indicates that the value of an object property has been updated.
 
Method Summary
 IpObject getObject()
          Get the object that the event concerns, e.g., the object to which a property was added.
 java.lang.String getOldValue()
          Get the value of the property before it was updated.
 IpIdentifier getProcessId()
          Get the identifier of the process that caused the event to occur, i.e., the process that is the source of the event.
 java.lang.String getPropertyGroup()
          Get the name of the group of the property that the event concerns.
 java.lang.String getPropertyName()
          Get the name of the property that the event concerns.
 IpIdentifier getReplicaId()
          Get the identifier of the replicated object that was updated.
 java.lang.String getValue()
          Get the value of the property after it was updated.
 
Methods inherited from class org.iperg.part.core.IpEvent
getDestination, getType, read, setDestination, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ADD

public static final java.lang.String PROP_ADD
An event type that indicates that a new property has been added to an object.

See Also:
Constant Field Values

PROP_REMOVE

public static final java.lang.String PROP_REMOVE
An event type that indicates that a property has been removed from an object.

See Also:
Constant Field Values

PROP_UPDATE

public static final java.lang.String PROP_UPDATE
An event type that indicates that the value of an object property has been updated. Is always generated in the process holding the master, but requires subscription to the corresponding property in order to be generated in processes holding a replica.

See Also:
Constant Field Values
Method Detail

getReplicaId

public IpIdentifier getReplicaId()
Get the identifier of the replicated object that was updated.

Returns:
An identifier that represents a replicated object

getProcessId

public IpIdentifier getProcessId()
Get the identifier of the process that caused the event to occur, i.e., the process that is the source of the event.

Returns:
A process identifier

getObject

public IpObject getObject()
Get the object that the event concerns, e.g., the object to which a property was added.

Returns:
The object

getPropertyName

public java.lang.String getPropertyName()
Get the name of the property that the event concerns.

Returns:
The name of the property that was added, updated or removed

getPropertyGroup

public java.lang.String getPropertyGroup()
Get the name of the group of the property that the event concerns.

Returns:
The property group name of the property that was added, updated or removed

getValue

public java.lang.String getValue()
Get the value of the property after it was updated. Return value will only be valid if event type is PROP_UPDATE

Returns:
The property value after the update

getOldValue

public java.lang.String getOldValue()
Get the value of the property before it was updated. Return value will only be valid if event type is PROP_UPDATE

Returns:
The property value before the update