public class SnapshotProvider
extends java.lang.Object
DOF.Log#addListener.| Constructor and Description |
|---|
SnapshotProvider(org.opendof.core.oal.DOFSystem system)
Construct a new SnapshotProvider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterestListener(SnapshotInterestListener listener)
Adds a listener, which will receive notifications that there is interest added for a snapshot.
|
void |
close()
Terminate and close this instance.
|
void |
removeInterestListener(SnapshotInterestListener listener)
Removes a previously added listener.
|
void |
send(org.opendof.core.oal.DOFObjectID objectID,
org.opendof.core.oal.DOFInterfaceID interfaceID,
org.opendof.datatransfer.ValueSet.Row snapshot)
Updates the snapshot for a specified object and interface.
|
void |
stop(org.opendof.core.oal.DOFObjectID objectID,
org.opendof.core.oal.DOFInterfaceID interfaceID)
Stops the snapshot provider for the specified object and interface.
|
public SnapshotProvider(org.opendof.core.oal.DOFSystem system)
system - The DOFSystem instance allowing this class to use OpenDOF to facilitate network communications. Must not be null.public void close()
public void send(org.opendof.core.oal.DOFObjectID objectID,
org.opendof.core.oal.DOFInterfaceID interfaceID,
org.opendof.datatransfer.ValueSet.Row snapshot)
throws java.lang.Exception
objectID - The object to which the snapshot applies. Must not be null.interfaceID - The interface to which the snapshot applies. Must not be null.snapshot - The current snapshot to be sent. This also indicates the definition of the snapshot. Must not be null.
The definition must match any previous definition used for the same object and interface combination.java.lang.Exception - Thrown if the provider is unable to send the snapshot update.public void stop(org.opendof.core.oal.DOFObjectID objectID,
org.opendof.core.oal.DOFInterfaceID interfaceID)
objectID - The object for which the snapshot will be stopped. Must not be null.interfaceID - The interface for which the snapshot will be stopped. Must not be null.public void addInterestListener(SnapshotInterestListener listener)
listener - The listener to be added. Must not be null.public void removeInterestListener(SnapshotInterestListener listener)
listener - The listener to be removed. Must not be null.