Interface WatchOperationsInterface
-
- All Known Subinterfaces:
EngineClientInterface
- All Known Implementing Classes:
EngineClientBean
public interface WatchOperationsInterfaceWatchOperationsInterface is an interface that specifies the standard operations to enable an engine client to extract status information from a remote correlator.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_STATUS_POLLING_INTERVALThe default value for the statusPollingInterval property.static java.lang.StringPROPERTY_STATUSThe string name of the bound property that is used for status updates (typically "status", but this constant should be used to be sure).static java.lang.StringPROPERTY_STATUS_POLLING_INTERVALThe string name of the bound property that is used for statusPollingInterval updates (typically "statusPollingInterval", but this constant should be used to be sure).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EngineStatusgetRemoteStatus()Request the remote Engine status.EngineStatusgetStatus()Get the most recently recorded status.intgetStatusPollingInterval()Get the statusPollingInterval (in milliseconds) that the background thread should wait between calls for new status information.voidsetStatusPollingInterval(int newStatusPollingInterval)Set the statusPollingInterval (in milliseconds) that the background thread should wait between calls for new status information.voidstartStatusPollingThread()Start the local status polling thread.voidstopStatusPollingThread()Stop the local status polling thread.
-
-
-
Field Detail
-
DEFAULT_STATUS_POLLING_INTERVAL
static final int DEFAULT_STATUS_POLLING_INTERVAL
The default value for the statusPollingInterval property.- See Also:
- Constant Field Values
-
PROPERTY_STATUS
static final java.lang.String PROPERTY_STATUS
The string name of the bound property that is used for status updates (typically "status", but this constant should be used to be sure).- See Also:
- Constant Field Values
-
PROPERTY_STATUS_POLLING_INTERVAL
static final java.lang.String PROPERTY_STATUS_POLLING_INTERVAL
The string name of the bound property that is used for statusPollingInterval updates (typically "statusPollingInterval", but this constant should be used to be sure).- See Also:
- Constant Field Values
-
-
Method Detail
-
startStatusPollingThread
void startStatusPollingThread() throws EngineExceptionStart the local status polling thread. If a connection is not yet established, this method will request a connection.- Throws:
EngineException- Thrown if any exceptions occur in the Client SDK.
-
stopStatusPollingThread
void stopStatusPollingThread()
Stop the local status polling thread.
-
getRemoteStatus
EngineStatus getRemoteStatus() throws EngineException
Request the remote Engine status. This method will not store the status result, and is available as an alternative to the background polling service. If a connection is not yet established, this method will request a connection.- Returns:
- The status as obtained directly from an Engine.
- Throws:
EngineException- Thrown if any exceptions occur in the Client SDK.
-
setStatusPollingInterval
void setStatusPollingInterval(int newStatusPollingInterval)
Set the statusPollingInterval (in milliseconds) that the background thread should wait between calls for new status information.- Parameters:
newStatusPollingInterval- Polling interval in milliseconds.
-
getStatusPollingInterval
int getStatusPollingInterval()
Get the statusPollingInterval (in milliseconds) that the background thread should wait between calls for new status information.- Returns:
- Polling interval in milliseconds.
-
getStatus
EngineStatus getStatus()
Get the most recently recorded status. Note that calling this method does NOT invoke a remote call to a correlator, but simply returns the last known status as collected by the internal worker thread.- Returns:
- the most recently status object. To be informed whenever the status changes, register a property change listener.
-
-