it.list.jft
Interface Context

All Superinterfaces:
LifeCycle

public interface Context
extends LifeCycle

Container and factory of inter-related communication objects.

Within the same JFT application several Contexts can be created and then used to interact with one or more FastTrack servers.

This interface contains methods to create CommunicationLifeCycle objects: i.e. Connections and their related ActivityLifeCycle objects:

Methods to create their parameters are provided as well.

Please note that each Connection and its related ActivityLifeCycle objects are enforced to exist in the same Context: e.g. it's not possible to create a subscription in a Context that does not contains the associated Connection.

Context Lifecycle

See Also:
JFT.makeContext(), Acceptable Values

Field Summary
 
Fields inherited from interface LifeCycle
RESULT_GENERIC_ERROR, RESULT_INVALID_STATUS, RESULT_OK, STATUS_INIT, STATUS_RELEASED
 
Method Summary
 Connection makeConnection(ConnectionParam param, ConnectionListener listener)
          Create and returns a new connection.
 ConnectionParam makeConnectionParam()
          Create and returns a new connection parameter container.
 EntityClassQuery makeEntityClassQuery(Connection connection, EntityClassQueryParam param, EntityClassQueryListener listener)
           
 EntityClassQueryParam makeEntityClassQueryParam()
           
 Filter makeFilter(Connection connection, FilterParam param, FilterListener listener)
          Create and returns a new filter.
 FilterParam makeFilterParam()
          Create and returns a new filter parameter container.
 MulticastConnection makeMulticastConnection(MulticastConnectionParam param, MulticastConnectionListener listener)
           
 MulticastConnectionParam makeMulticastConnectionParam()
           
 Query makeQuery(Connection connection, QueryParam param, QueryListener listener)
          Create and returns a new query.
 QueryParam makeQueryParam()
          Create and returns a new query parameter container.
 Subscription makeSubscription(Connection connection, SubscriptionParam param, SubscriptionListener listener)
          Create and returns a new subscription.
 SubscriptionParam makeSubscriptionParam()
          Create and returns a new subscription parameter container.
 Transaction makeTransaction(Connection connection, TransactionParam param, TransactionListener listener)
          Create and returns a new transaction.
 TransactionParam makeTransactionParam()
          Create and returns a new transaction parameter container.
 
Methods inherited from interface LifeCycle
enumChilds, getStatus, release
 

Method Detail

makeConnection

Connection makeConnection(ConnectionParam param,
                          ConnectionListener listener)
                          throws NullPointerException,
                                 IllegalArgumentException,
                                 IllegalStateException
Create and returns a new connection.

The current status of the returned connection is STATUS_INIT.

At the return of this method the given ConnectionParam parameter container is bound.

Parameters:
param - connection parameter container.
listener - connection listener.
Returns:
the new connection.
null is never returned.
Throws:
NullPointerException - if some parameter is null.
IllegalArgumentException - if Param contains un-acceptable values.
IllegalStateException - if the current status is not STATUS_INIT.
See Also:
Acceptable Values

makeConnectionParam

ConnectionParam makeConnectionParam()
Create and returns a new connection parameter container.

Each parameter of the returned container has its value equal to default-value as described in the corresponding ConnectionParam.getSomething description.

Returns:
the new connection parameter container.
null is returned when the current status is not STATUS_INIT.

makeFilter

Filter makeFilter(Connection connection,
                  FilterParam param,
                  FilterListener listener)
                  throws NullPointerException,
                         IllegalArgumentException,
                         IllegalStateException
Create and returns a new filter.

The current status of the returned filter is STATUS_INIT.

At the return of this method the given FilterParam parameter container is bound.

Parameters:
connection - associated connection.
param - filter parameter container.
listener - filter listener.
Returns:
the new filter.
null is never returned.
Throws:
NullPointerException - if some parameter is null.
IllegalArgumentException - if Param contains un-acceptable values,
or the given connection is not associated to this context.
IllegalStateException - if the current status is not STATUS_INIT,
or the status of the given connection is not Connection.STATUS_CONNECTED.
See Also:
Acceptable Values

makeFilterParam

FilterParam makeFilterParam()
Create and returns a new filter parameter container.

Each parameter of the returned container has its value equal to default-value as described in the corresponding FilterParam.getSomething description.

Returns:
the new filter parameter container.
null is returned when the current status is not STATUS_INIT.

makeQuery

Query makeQuery(Connection connection,
                QueryParam param,
                QueryListener listener)
                throws NullPointerException,
                       IllegalArgumentException,
                       IllegalStateException
Create and returns a new query.

The current status of the returned query is STATUS_INIT.

At the return of this method the given QueryParam parameter container is bound.

Parameters:
connection - associated connection.
param - query parameter container.
listener - query listener.
Returns:
the new query.
null is never returned.
Throws:
NullPointerException - if some parameter is null.
IllegalArgumentException - if Param contains un-acceptable values,
or the given connection is not associated to this context.
IllegalStateException - if the current status is not STATUS_INIT,
or the status of the given connection is not Connection.STATUS_CONNECTED.
See Also:
Acceptable Values

makeQueryParam

QueryParam makeQueryParam()
Create and returns a new query parameter container.

Each parameter of the returned container has its value equal to default-value as described in the corresponding QueryParam.getSomething description.

Returns:
the new query parameter container.
null is returned when the current status is not STATUS_INIT.

makeSubscription

Subscription makeSubscription(Connection connection,
                              SubscriptionParam param,
                              SubscriptionListener listener)
                              throws NullPointerException,
                                     IllegalArgumentException,
                                     IllegalStateException
Create and returns a new subscription.

The current status of the returned subscription is STATUS_INIT.

At the return of this method the given SubscriptionParam parameter container is bound.

Parameters:
connection - associated connection.
param - subscription parameter container.
listener - subscription listener.
Returns:
the new subscription.
null is never returned.
Throws:
NullPointerException - if some parameter is null.
IllegalArgumentException - if Param contains un-acceptable values,
or the given connection is not associated to this context.
IllegalStateException - if the current status is not STATUS_INIT,
or the status of the given connection is not Connection.STATUS_CONNECTED.
See Also:
Acceptable Values

makeSubscriptionParam

SubscriptionParam makeSubscriptionParam()
Create and returns a new subscription parameter container.

Each parameter of the returned container has its value equal to default-value as described in the corresponding SubscriptionParam.getSomething description.

Returns:
the new subscription parameter container.
null is returned when the current status is not STATUS_INIT.

makeTransaction

Transaction makeTransaction(Connection connection,
                            TransactionParam param,
                            TransactionListener listener)
                            throws NullPointerException,
                                   IllegalArgumentException,
                                   IllegalStateException
Create and returns a new transaction.

The current status of the returned transaction is STATUS_INIT.

At the return of this method the given TransactionParam parameter container is bound.

Parameters:
connection - associated connection.
param - transaction parameter container.
listener - transaction listener.
Returns:
the new transaction.
null is never returned.
Throws:
NullPointerException - if some parameter is null.
IllegalArgumentException - if Param contains un-acceptable values,
or the given connection is not associated to this context.
IllegalStateException - if the current status is not STATUS_INIT,
or the status of the given connection is not Connection.STATUS_CONNECTED.
See Also:
Acceptable Values

makeTransactionParam

TransactionParam makeTransactionParam()
Create and returns a new transaction parameter container.

Each parameter of the returned container has its value equal to default-value as described in the corresponding TransactionParam.getSomething description.

Returns:
the new transaction parameter container.
null is returned when the current status is not STATUS_INIT.

makeEntityClassQuery

EntityClassQuery makeEntityClassQuery(Connection connection,
                                      EntityClassQueryParam param,
                                      EntityClassQueryListener listener)
                                      throws NullPointerException,
                                             IllegalArgumentException,
                                             IllegalStateException
Throws:
NullPointerException
IllegalArgumentException
IllegalStateException

makeEntityClassQueryParam

EntityClassQueryParam makeEntityClassQueryParam()

makeMulticastConnection

MulticastConnection makeMulticastConnection(MulticastConnectionParam param,
                                            MulticastConnectionListener listener)
                                            throws NullPointerException,
                                                   IllegalArgumentException,
                                                   IllegalStateException
Throws:
NullPointerException
IllegalArgumentException
IllegalStateException

makeMulticastConnectionParam

MulticastConnectionParam makeMulticastConnectionParam()


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