it.list.jft
Interface LifeCycle

All Known Subinterfaces:
ActivityLifeCycle, CommunicationLifeCycle, Connection, Context, EntityClassQuery, EntityFilter, Filter, JFT, MulticastConnection, Query, Subscription, Transaction

public interface LifeCycle

Super-interface common to all lifecycles.

LifeCycle Usage

All JFT LifeCycle objects share:

The three directs sub-interfaces of LifeCycle (JFT, Context and CommunicationLifeCycle) add many other capabilities to this interface.

Lifecycle

See Also:
JFT LifeCycle, Context LifeCycle, Connection LifeCycle, Filter LifeCycle, Query LifeCycle, Subscription LifeCycle, Transaction LifeCycle

Field Summary
static int RESULT_GENERIC_ERROR
          Generic failure-code returned when a more specific error is not available.
static int RESULT_INVALID_STATUS
          Failure-code returned when an operation is requested whitin a not correct status.
static int RESULT_OK
          Positive answer returned when the operation completed successfully.
static int STATUS_INIT
          Lifecycle status: initial status for every object that implements the LifeCycle interface.
static int STATUS_RELEASED
          Lifecycle status: final status for every object that implements the LifeCycle interface.
 
Method Summary
 Enumeration enumChilds()
          Returns an enumeration of all non-STATUS_RELEASED childs of this LifeCycle.
 int getStatus()
          Returns the current lifecycle status of this object.
 void release()
          Abruptly and recursively move an object in the final STATUS_RELEASED status.
 

Field Detail

RESULT_OK

static final int RESULT_OK
Positive answer returned when the operation completed successfully.

See Also:
Constant Field Values

RESULT_GENERIC_ERROR

static final int RESULT_GENERIC_ERROR
Generic failure-code returned when a more specific error is not available.

See Also:
Constant Field Values

RESULT_INVALID_STATUS

static final int RESULT_INVALID_STATUS
Failure-code returned when an operation is requested whitin a not correct status.

See Also:
Constant Field Values

STATUS_INIT

static final int STATUS_INIT
Lifecycle status: initial status for every object that implements the LifeCycle interface.
This value may be returned by getStatus().

Status Entry:
object creation → STATUS_INIT.
Status Activities:
getStatus() and other specific activities allowed in this status for the specific subinterfaces of LifeCycle.
Status Exit:
any status → release()STATUS_RELEASED.

See Also:
Constant Field Values

STATUS_RELEASED

static final int STATUS_RELEASED
Lifecycle status: final status for every object that implements the LifeCycle interface.
This value may be returned by getStatus().

Status Entry:
any status → release()STATUS_RELEASED.
Status Activities:
getStatus() or other activities that does not depend from the status of the object (e.g. JFT.getLibraryVersion() in JFT, CommunicationLifeCycle.getContext() in CommunicationLifeCycle, etc...).
Status Exit:
none: an object in this status will never change status.

See Also:
Constant Field Values
Method Detail

release

void release()
Abruptly and recursively move an object in the final STATUS_RELEASED status.

This object, and all others objects that depends from this object (see later), are abruptly moved on the final STATUS_RELEASED status. For the objects in this final status:

The recursive moving of an object in the final status obeys to the following tree structure: E.g. if this method is called on a connection then this connection and all its childs (filters, subscriptions, queries and transactions) are moved on the final STATUS_RELEASED status. Please note: JFT, all contexts, all other connections and all other childs of others connections are unaffected by this operation in this example.

This method may be invoked at any time, even if this object is already in the final STATUS_RELEASED status.


getStatus

int getStatus()
Returns the current lifecycle status of this object.

Each object has a status that may be one of the two commons LifeCycle status (STATUS_INIT or STATUS_RELEASED) or a specific status that is described by a constant STATUS_ described in one of the subinterface of LifeCycle.

Returns:
the current lifecycle status of this object.

enumChilds

Enumeration enumChilds()
Returns an enumeration of all non-STATUS_RELEASED childs of this LifeCycle.

The hierarchy is depicted in the release() description.

This method returns only the first level childs of a given LifeCycle: e.g. for a Context it returns only the Connections of this Context and not their ActivityLifeCycle childs.

This method may be invoked at any time, even if this object is in the final STATUS_RELEASED status.

Returns:
an enumeration of all non-STATUS_RELEASED childs of this LifeCycle.
null is never returned.


Submit a bug or feature to FT\API Programming Support<\font>