org.csapi.jr.se
Interface Activity

All Superinterfaces:
CsapiInterface, java.io.Serializable
All Known Subinterfaces:
AdminRelatedDeleteMessage, AdminRelatedGetMessage, AdminRelatedPutMessage, AppInterface, CallLoadControl, CallLoadControl, CallNotification, CallRelatedSendInfo, CallRelatedSendInfoAndCollect, Connect, DeleteMessage, EvalPolicy, ExtendedLocationReport, ExtendedStatusReport, ExtTriggeredStatusReporting, ForEvent, GetMessage, LocationReport, LocationReport, MediaNotification, Notification, Notification, Notification, Notification, Notification, Notification, Notifications, Notifications, Notifications, Notifications, PeriodicLocationReporting, PeriodicLocationReporting, QueryBalance, RecordMessage, RetrieveTransactionHistory, Route, SendInfo, SendInfoAndCollect, StatusReport, TriggeredLocationReporting, TriggeredLocationReporting, TriggeredStatusReporting, TriggeredTerminalCapability

public interface Activity
extends CsapiInterface

This interface specifies an activity which might be provided by a service.
An activity has three states: "idle", "active" and "invalid".
The initial state is "idle" and here the listeners should be registered.
It performs in the "active" state.
It enters the "invalid" state when it has fulfilled its task or a fatal error occured.
In special cases state transition from "idle" to "invalid" is possible.


Field Summary
static int ACTIVE_STATE
          This constant value represents the "idle" state.
static int IDLE_STATE
          This constant value represents the "active" state.
static int INVALID_STATE
          This constant value represents the "invalid" state.
 
Method Summary
 void addActivityStateChangeListener(org.csapi.jr.se.ActivityStateChangeListener activityStateChangeListener)
          Add listener to receive notification when the activity object changes state
 int getState()
          Gets the state attribute of the Activity object
 void removeActivityStateChangeListener(org.csapi.jr.se.ActivityStateChangeListener activityStateChangeListener)
          Remove listener for activity state changes
 

Field Detail

IDLE_STATE

public static final int IDLE_STATE
This constant value represents the "active" state.

See Also:
Constant Field Values

ACTIVE_STATE

public static final int ACTIVE_STATE
This constant value represents the "idle" state.

See Also:
Constant Field Values

INVALID_STATE

public static final int INVALID_STATE
This constant value represents the "invalid" state.

See Also:
Constant Field Values
Method Detail

getState

public int getState()
Gets the state attribute of the Activity object

Returns:
the state value

addActivityStateChangeListener

public void addActivityStateChangeListener(org.csapi.jr.se.ActivityStateChangeListener activityStateChangeListener)
Add listener to receive notification when the activity object changes state

Parameters:
activityStateChangeListener - object implementing the ActivityStateChangeListener interface

removeActivityStateChangeListener

public void removeActivityStateChangeListener(org.csapi.jr.se.ActivityStateChangeListener activityStateChangeListener)
Remove listener for activity state changes

Parameters:
activityStateChangeListener - object implementing the ActivityStateChangeListener interface