public interface TucsonHelper
extends jade.core.ServiceHelper
Modifier and Type | Method and Description |
---|---|
void |
acquireACC(jade.core.Agent agent)
Enables ACC acquisition on the default local TuCSoN Node.
|
void |
acquireACC(jade.core.Agent agent,
java.lang.String netid,
int portno)
Enables ACC acquisition on the given TuCSoN Node.
|
alice.tucson.api.TucsonTupleCentreId |
buildTucsonTupleCentreId(java.lang.String tupleCentreName,
java.lang.String netid,
int portno)
Builds the
TucsonTupleCentreId identifying the
tuple centre named tupleCentreName and reachable at IP
address netid :portno . |
BridgeToTucson |
getBridgeToTucson(jade.core.Agent agent)
Gets the
BridgeToTucson providing JADE agents the API to benefit
of TuCSoN coordination services. |
boolean |
isActive(java.lang.String netid,
int port,
int timeout)
Checks if a TuCSoN Node is active on the given TCP/IP address.
|
void |
releaseACC(jade.core.Agent agent)
Releases the ACC held by the caller agent.
|
void |
startTucsonNode(int port)
Enables to start a
TucsonNodeService on the
given TCP port on the local host. |
void |
stopTucsonNode(int port)
Enables to stop a
TucsonNodeService on the
given TCP port on the local host. |
void acquireACC(jade.core.Agent agent) throws alice.tucson.api.exceptions.TucsonInvalidAgentIdException
acquireACC(Agent, String, int)
givin the default local TuCSoN
Node addresses.agent
- the agent requesting authenticationalice.tucson.api.exceptions.TucsonInvalidAgentIdException
- if the given agent id is not a valid TuSCoN agent idvoid acquireACC(jade.core.Agent agent, java.lang.String netid, int portno) throws alice.tucson.api.exceptions.TucsonInvalidAgentIdException
agent
- the agent requesting authenticationnetid
- IP address of the TuCSoN Node to interact withportno
- TCP port number of the TuCSoN Node to interact withalice.tucson.api.exceptions.TucsonInvalidAgentIdException
- if the given agent id is not a valid TuSCoN agent idalice.tucson.api.TucsonTupleCentreId buildTucsonTupleCentreId(java.lang.String tupleCentreName, java.lang.String netid, int portno) throws alice.tucson.api.exceptions.TucsonInvalidTupleCentreIdException
TucsonTupleCentreId
identifying the
tuple centre named tupleCentreName
and reachable at IP
address netid
:portno
.tupleCentreName
- the name of the tuple centrenetid
- IP address of the tuple centreportno
- TCP port number of the tuple centrealice.tucson.api.exceptions.TucsonInvalidTupleCentreIdException
- if given name is not a valid TuCSoN tuple centre idBridgeToTucson getBridgeToTucson(jade.core.Agent agent) throws CannotAcquireACCException
BridgeToTucson
providing JADE agents the API to benefit
of TuCSoN coordination services.agent
- the agent requesting access to the TuCSoN4JADE bridge
componentCannotAcquireACCException
- if the agent
cannot get an ACC (e.g. another
agent with same id already exists)boolean isActive(java.lang.String netid, int port, int timeout)
netid
- the IP address to testport
- the TCP port number to testtimeout
- the maximum waiting time for the testvoid releaseACC(jade.core.Agent agent)
agent
- the agent releasing its ACCvoid startTucsonNode(int port) throws alice.tucson.api.exceptions.TucsonOperationNotPossibleException
TucsonNodeService
on the
given TCP port on the local host.port
- the TCP port number to start the TuCSoN Node onalice.tucson.api.exceptions.TucsonOperationNotPossibleException
- if the TuCSoN node cannot be started (e.g. TCP port
already in use)void stopTucsonNode(int port)
TucsonNodeService
on the
given TCP port on the local host.port
- the TCP port number to stop the TuCSoN Node on