kaos.flexfeed.flik
Class FLIKClient

java.lang.Object
  extended by kaos.flexfeed.flik.FLIKClient

public class FLIKClient
extends java.lang.Object


Field Summary
static java.lang.String MOBILITY_CONSTRAINTS
           
static java.lang.String VIDEO_CONSTRAINTS
           
 
Constructor Summary
FLIKClient(java.lang.String host, int port)
           
 
Method Summary
 void addPolicyUpdateListener(PolicyUpdateListener listener)
          Adds a listener which will be notified when policies have been updated
 void deregisterAgent(java.lang.String agentName)
           
 void deregisterEnvironment(java.lang.String envUUID)
           
 PolicyConstraints 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
 boolean peerUnreachableWarning(long timeSinceLastContact)
           
 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
 

Field Detail

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
Constructor Detail

FLIKClient

public FLIKClient(java.lang.String host,
                  int port)
Method Detail

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 PolicyConstraints 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 this method returns a VideoFeedConstraints object. In this case, the source should be the entity providing the video feed, and the dest is the client receiving the feed

Throws:
java.io.IOException

addPolicyUpdateListener

public void addPolicyUpdateListener(PolicyUpdateListener listener)
Adds a listener which will be notified when policies have been updated


peerUnreachableWarning

public boolean peerUnreachableWarning(long timeSinceLastContact)

main

public static void main(java.lang.String[] args)