Boeing Simulation 3.1 API Specification

command
Class BasicCommandControl

java.lang.Object
  |
  +--connect.socket.SocketComponentTemplate
        |
        +--command.BasicCommandControl
All Implemented Interfaces:
CommandControl, Component

public class BasicCommandControl
extends SocketComponentTemplate
implements CommandControl

A basic implementation that relies on a GraphicalVisualizer to send it new Missions to process.

Version:
Author:
Dave Jurgens

Field Summary
private  world.WorldState currentState
          The most recently sent WorldState that is provided by the Server.
private  util.ConsumerQueue fromServer
          A buffered queue for reading in mission request responses as well as MethodRequest objects.
private  PropertyChangeSupport pcs
          The bean by which the Visualizers will be notified of when the server updates this Component's current WorldState.
private static long serialVersionUID
           
private  boolean serverConnected
          Whether the server is currently connected.
private  util.Queue toServer
          A buffered queue for writing mission requests to the server.
 
Fields inherited from class connect.socket.SocketComponentTemplate
portNumber
 
Constructor Summary
BasicCommandControl(int port)
           
 
Method Summary
protected  boolean accept(Class requestingType)
          Returns true only if the requesting component is a Command Control visualizer.
protected  boolean allowMethod(util.MethodRequest request)
          Allows visualizers to request the method requestMission(mission.Mission).
protected  void processAcceptedConnection(Class hostType, connect.ChannelBundle acceptedConnection)
          Processes requests from a single connection to the Server and no other component.
protected  void processRequestingConnection(connect.ComponentEmissary requesting, connect.ChannelBundle incomingConnection)
          Process an accepted request from a CommandControl Visualizer.
 util.ReturnValue requestMission(mission.Mission requested)
          Formulate a Mission ask that the MissionControl process it.
 
Methods inherited from class connect.socket.SocketComponentTemplate
connect, getComponentEmissary, getConnection, getMaxPoints, processRelayPoint, spawnRelayPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

serverConnected

private boolean serverConnected
Whether the server is currently connected.


fromServer

private util.ConsumerQueue fromServer
A buffered queue for reading in mission request responses as well as MethodRequest objects.


pcs

private PropertyChangeSupport pcs
The bean by which the Visualizers will be notified of when the server updates this Component's current WorldState.


toServer

private util.Queue toServer
A buffered queue for writing mission requests to the server.


currentState

private world.WorldState currentState
The most recently sent WorldState that is provided by the Server.

Constructor Detail

BasicCommandControl

public BasicCommandControl(int port)
Method Detail

requestMission

public util.ReturnValue requestMission(mission.Mission requested)
Formulate a Mission ask that the MissionControl process it.

Specified by:
requestMission in interface CommandControl

processRequestingConnection

protected void processRequestingConnection(connect.ComponentEmissary requesting,
                                           connect.ChannelBundle incomingConnection)
Process an accepted request from a CommandControl Visualizer.

Specified by:
processRequestingConnection in class SocketComponentTemplate

processAcceptedConnection

protected void processAcceptedConnection(Class hostType,
                                         connect.ChannelBundle acceptedConnection)
Processes requests from a single connection to the Server and no other component.

Specified by:
processAcceptedConnection in class SocketComponentTemplate

accept

protected boolean accept(Class requestingType)
Returns true only if the requesting component is a Command Control visualizer.

Specified by:
accept in class SocketComponentTemplate

allowMethod

protected boolean allowMethod(util.MethodRequest request)
Allows visualizers to request the method requestMission(mission.Mission).

Specified by:
allowMethod in class SocketComponentTemplate

Boeing Simulation 3.1 API Specification

To submit a bug or feature email the author of that class. Funding for this research was provided by Boeing and DARPA.