kaos.aci.flexfeed
Class FlexfeedClient
java.lang.Object
kaos.aci.ACIClient
kaos.aci.flexfeed.FlexfeedClient
- Direct Known Subclasses:
- FlexfeedFilterClient
public class FlexfeedClient
- extends ACIClient
- Author:
- Administrator
Fields inherited from class kaos.aci.ACIClient |
_host, _listeners, _mocket, _port, _reader, _resultTable, _serverIsLocal, _writer, DEFAULT_PORT, OK_MESSAGE, RECONNECT_DELAY, WARNING_MESSAGE |
Constructor Summary |
protected |
FlexfeedClient(java.lang.String host,
int port)
|
Method Summary |
void |
deregisterAgent(java.lang.String agentName)
|
void |
deregisterEnvironment(java.lang.String envUUID)
|
static FlexfeedClient |
getInstance()
|
java.util.Vector |
getPolicyConstraintsBetweenEntities(java.lang.String sourceId,
java.lang.String destId,
java.lang.String type)
Returns the policy constraints of the given type for the given source and destination entities
(that is, the source entity is the actor of the policy, and the destination entity is the target of the policy). |
PolicyConstraints |
getPolicyConstraintsForEntity(java.lang.String entityId,
java.lang.String type)
Returns the policy constraints of the given type for the given entity (that is,
the given entity is the actor of the policy). |
static void |
main(java.lang.String[] args)
|
void |
modifyAgentRegistration(java.lang.String agentName,
java.lang.String envUUID,
java.util.Vector domainList)
Modifies an agent registration with an updated envUUID and/or domainList |
void |
modifyEnvironmentRegistration(java.lang.String envUUID,
java.util.Vector domainList,
boolean isMobile)
Modifies an environment registration with an updated domainList or mobility |
void |
registerAgent(java.lang.String agentName,
java.lang.String envUUID,
java.util.Vector domainList)
Register an agent in FlexFeed. |
void |
registerEnvironment(java.lang.String envUUID,
java.util.Vector domainList,
boolean isMobile)
Register the environment with KAoS. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MOBILITY_CONSTRAINTS
public static final java.lang.String MOBILITY_CONSTRAINTS
- See Also:
- Constant Field Values
VIDEO_CONSTRAINTS
public static final java.lang.String VIDEO_CONSTRAINTS
- See Also:
- Constant Field Values
FILTER_CONSTRAINTS
public static final java.lang.String FILTER_CONSTRAINTS
- See Also:
- Constant Field Values
FlexfeedClient
protected FlexfeedClient(java.lang.String host,
int port)
getInstance
public static FlexfeedClient getInstance()
registerEnvironment
public void registerEnvironment(java.lang.String envUUID,
java.util.Vector domainList,
boolean isMobile)
throws java.io.IOException
- Register the environment with KAoS. By environment, we mean a Physical node in the framework,
e.g. a host. The envUUID provided is a FlexFeed-generated unique identifier. Any reference to
this environment from FlexFeed will be based on its envUUID. The environment may be fixed or
mobile, as indicated by the isMobile parameter.
- Throws:
java.io.IOException
registerAgent
public void registerAgent(java.lang.String agentName,
java.lang.String envUUID,
java.util.Vector domainList)
throws java.io.IOException
- Register an agent in FlexFeed. The name is unique within FlexFeed and will be used by the
framework to register /lookup this agent with KAoS.
- Throws:
java.io.IOException
modifyAgentRegistration
public void modifyAgentRegistration(java.lang.String agentName,
java.lang.String envUUID,
java.util.Vector domainList)
throws java.io.IOException
- Modifies an agent registration with an updated envUUID and/or domainList
- Throws:
java.io.IOException
modifyEnvironmentRegistration
public void modifyEnvironmentRegistration(java.lang.String envUUID,
java.util.Vector domainList,
boolean isMobile)
throws java.io.IOException
- Modifies an environment registration with an updated domainList or mobility
- Throws:
java.io.IOException
deregisterAgent
public void deregisterAgent(java.lang.String agentName)
throws java.io.IOException
- Throws:
java.io.IOException
deregisterEnvironment
public void deregisterEnvironment(java.lang.String envUUID)
throws java.io.IOException
- Throws:
java.io.IOException
getPolicyConstraintsForEntity
public PolicyConstraints getPolicyConstraintsForEntity(java.lang.String entityId,
java.lang.String type)
throws java.io.IOException
- Returns the policy constraints of the given type for the given entity (that is,
the given entity is the actor of the policy). The type is currently limited to {MOBILITY_CONSTRAINTS},
since it doesn't make sense to ask for VideoFeed constraints without a target. This method
returns a PolicyConstraints object which corresponds to the type, in this case RobotMobilityConstraints.
- Throws:
java.io.IOException
getPolicyConstraintsBetweenEntities
public java.util.Vector getPolicyConstraintsBetweenEntities(java.lang.String sourceId,
java.lang.String destId,
java.lang.String type)
throws java.io.IOException
- Returns the policy constraints of the given type for the given source and destination entities
(that is, the source entity is the actor of the policy, and the destination entity is the target of the policy).
The type is currently limited to {VIDEO_CONSTRAINTS and FILTER_CONSTRAINTS}, and this method returns a
VideoFeedConstraints or FilterConstraints object correspondingly.
For the VIDEO_CONSTRAINTS, the source should be the entity providing the video feed, and the dest is the client receiving the feed.
For the FILTER_CONSTRAINTS, the source is the entity requesting position info of the entity identified by the destId.
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)