simulator
Class GenericSendVRML

java.lang.Object
  |
  +--simulator.GenericSendVRML

abstract class GenericSendVRML
extends java.lang.Object

This is an abstract class created to be extended for making the SendVRML class able to operate with your simulation ambient and your client send VRML protocol. The derived class must be like this:

    class MySendVRML extend GenericSendVRML{
      // this is the list of your variable
      ...
      public void runTask() {
        //this is the procedure called with late-bilding method
        //that you must use to your simulation strategy
      }
      public void sendVRML() {
        //this is the procedure called with late-bilding method
        //that you must use to your send VRML
      }
    }
 


Field Summary
protected  java.util.Hashtable connectedUsers
          This contains the list of connected user and will be always used for a simulation strategy in runTask.
protected  Server server
          Contains the instance to the Server class
protected  java.util.Hashtable state
          This contains the list of the state of simulation and will be always used for a simulation strategy in runTask.
 
Constructor Summary
(package private) GenericSendVRML()
           
 
Method Summary
 void broadcast(java.lang.String s)
          Broadcasting a string to all the connected clients
 void init(Server server)
          This initialize the internal variable
abstract  void runTask()
          This is the procedure called by SendVRML thread when we must updating the simulator state.
abstract  void sendVRML()
          This is the procedure called by sendVRML thread when we send the VRML view to the connected clients.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

connectedUsers

protected java.util.Hashtable connectedUsers
This contains the list of connected user and will be always used for a simulation strategy in runTask. It's the same that you can extract from server variable.

state

protected java.util.Hashtable state
This contains the list of the state of simulation and will be always used for a simulation strategy in runTask. It's the same that you can extract from server variable.

server

protected Server server
Contains the instance to the Server class
Constructor Detail

GenericSendVRML

GenericSendVRML()
Method Detail

init

public void init(Server server)
This initialize the internal variable
Parameters:
server - the instance to Server

runTask

public abstract void runTask()
This is the procedure called by SendVRML thread when we must updating the simulator state. It's abstract so you must implements it. This method should use like this:


sendVRML

public abstract void sendVRML()
This is the procedure called by sendVRML thread when we send the VRML view to the connected clients. It's abstract so you must implements it. This method shuld use like this:

See Also:
Client.runCommand(java.lang.String)

broadcast

public void broadcast(java.lang.String s)
Broadcasting a string to all the connected clients
Parameters:
s - the string to broadcasting