public interface Context
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.
JFT.makeContext()
,
Acceptable
ValuesField Summary |
---|
Fields inherited from interface LifeCycle |
---|
RESULT_GENERIC_ERROR, RESULT_INVALID_STATUS, RESULT_OK, STATUS_INIT, STATUS_RELEASED |
Methods inherited from interface LifeCycle |
---|
enumChilds, getStatus, release |
Method Detail |
---|
Connection makeConnection(ConnectionParam param, ConnectionListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
The current status of the returned connection is
STATUS_INIT
.
At the return of this method the given ConnectionParam
parameter
container is bound.
param
- connection parameter container.listener
- connection listener.
null
is never returned.
NullPointerException
- if some parameter is null
.
IllegalArgumentException
- if Param
contains un-acceptable values.
IllegalStateException
- if the current status is not
STATUS_INIT
.ConnectionParam makeConnectionParam()
Each parameter of the returned container has its value equal to
default-value as described in the corresponding ConnectionParam
.getSomething
description.
null
is returned when the
current status is not
STATUS_INIT
.Filter makeFilter(Connection connection, FilterParam param, FilterListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
The current status of the returned filter is
STATUS_INIT
.
At the return of this method the given FilterParam
parameter
container is bound.
connection
- associated connection.param
- filter parameter container.listener
- filter listener.
null
is never returned.
NullPointerException
- if some parameter is null
.
IllegalArgumentException
- if Param
contains un-acceptable values, connection
is not
associated to
this context.
IllegalStateException
- if the current status is not
STATUS_INIT
, connection
is not
Connection.STATUS_CONNECTED
.FilterParam makeFilterParam()
Each parameter of the returned container has its value equal to
default-value as described in the corresponding FilterParam
.getSomething
description.
null
is returned when the
current status is not
STATUS_INIT
.Query makeQuery(Connection connection, QueryParam param, QueryListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
The current status of the returned query is
STATUS_INIT
.
At the return of this method the given QueryParam
parameter
container is bound.
connection
- associated connection.param
- query parameter container.listener
- query listener.
null
is never returned.
NullPointerException
- if some parameter is null
.
IllegalArgumentException
- if Param
contains un-acceptable values, connection
is not
associated to
this context.
IllegalStateException
- if the current status is not
STATUS_INIT
, connection
is not
Connection.STATUS_CONNECTED
.QueryParam makeQueryParam()
Each parameter of the returned container has its value equal to
default-value as described in the corresponding QueryParam
.getSomething
description.
null
is returned when the
current status is not
STATUS_INIT
.Subscription makeSubscription(Connection connection, SubscriptionParam param, SubscriptionListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
The current status of the returned subscription
is STATUS_INIT
.
At the return of this method the given SubscriptionParam
parameter container is bound.
connection
- associated connection.param
- subscription parameter container.listener
- subscription listener.
null
is never returned.
NullPointerException
- if some parameter is null
.
IllegalArgumentException
- if Param
contains un-acceptable values, connection
is not
associated to
this context.
IllegalStateException
- if the current status is not
STATUS_INIT
, connection
is not
Connection.STATUS_CONNECTED
.SubscriptionParam makeSubscriptionParam()
Each parameter of the returned container has its value equal to
default-value as described in the corresponding SubscriptionParam
.getSomething
description.
null
is returned when the
current status is not
STATUS_INIT
.Transaction makeTransaction(Connection connection, TransactionParam param, TransactionListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
The current status of the returned transaction is
STATUS_INIT
.
At the return of this method the given TransactionParam
parameter
container is bound.
connection
- associated connection.param
- transaction parameter container.listener
- transaction listener.
null
is never returned.
NullPointerException
- if some parameter is null
.
IllegalArgumentException
- if Param
contains un-acceptable values, connection
is not
associated to
this context.
IllegalStateException
- if the current status is not
STATUS_INIT
, connection
is not
Connection.STATUS_CONNECTED
.TransactionParam makeTransactionParam()
Each parameter of the returned container has its value equal to
default-value as described in the corresponding TransactionParam
.getSomething
description.
null
is returned when the
current status is not
STATUS_INIT
.EntityClassQuery makeEntityClassQuery(Connection connection, EntityClassQueryParam param, EntityClassQueryListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
NullPointerException
IllegalArgumentException
IllegalStateException
EntityClassQueryParam makeEntityClassQueryParam()
MulticastConnection makeMulticastConnection(MulticastConnectionParam param, MulticastConnectionListener listener) throws NullPointerException, IllegalArgumentException, IllegalStateException
NullPointerException
IllegalArgumentException
IllegalStateException
MulticastConnectionParam makeMulticastConnectionParam()