igeo

## Class IDynamicServer

- java.lang.Object
- - igeo.IDynamicServer

- All Implemented Interfaces:
    java.lang.Runnable

      public class IDynamicServer
      extends java.lang.Object
      implements java.lang.Runnable

  A server to take care of all IDynamicObject. It runs as separate thread.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.ArrayList<IDynamics>` | `addingDynamics`
    `int` | `duration`
    `java.util.ArrayList<IDynamics>` | `dynamics`
    `java.util.ArrayList<IDynamics>` | `removingDynamics`
    `boolean` | `runningDynamics`
    `IServer` | `server`
    `boolean` | `showTime`
    `boolean` | `startedOnce`
    `java.lang.Thread` | `thread`
    `int` | `time`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IDynamicServer(IServerI s)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(IDynamics e)`
    `void` | `add(IObject e)`
    `int` | `addingNum()` get number of dynamic objects to be added in the next update cycle
    `void` | `clear()`
    `int` | `duration()`
    `IDynamicServer` | `duration(int dur)`
    `IDynamics` | `get(int i)` get i-th dynamic object in the server
    `boolean` | `isRunning()`
    `int` | `num()` get number of current dynamic objects in the server
    `void` | `pause()`
    `void` | `remove(IDynamics d)`
    `void` | `remove(int i)`
    `int` | `removingNum()` get number of dynamic objects to be removed in the next update cycle
    `void` | `reset()` in case dynamicServer need to start again after stopped.
    `void` | `resume()`
    `void` | `run()`
    `IDynamicServer` | `showTime(boolean flag)`
    `void` | `start()`
    `void` | `startWithoutThread()`
    `void` | `step()`
    `void` | `stop()`
    `int` | `time()`
    `IDynamicServer` | `time(int tm)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### thread

          public java.lang.Thread thread

    - #### server

          public IServer server

    - #### runningDynamics

          public boolean runningDynamics

    - #### startedOnce

          public boolean startedOnce

    - #### dynamics

          public java.util.ArrayList<IDynamics> dynamics

    - #### addingDynamics

          public java.util.ArrayList<IDynamics> addingDynamics

    - #### removingDynamics

          public java.util.ArrayList<IDynamics> removingDynamics

    - #### duration

          public int duration

    - #### time

          public int time

    - #### showTime

          public boolean showTime

  - ### Constructor Detail

    - #### IDynamicServer

          public IDynamicServer(IServerI s)

  - ### Method Detail

    - #### add

          public void add(IObject e)

    - #### add

          public void add(IDynamics e)

    - #### addingNum

          public int addingNum()

      get number of dynamic objects to be added in the next update cycle

    - #### removingNum

          public int removingNum()

      get number of dynamic objects to be removed in the next update cycle

    - #### num

          public int num()

      get number of current dynamic objects in the server

    - #### get

          public IDynamics get(int i)

      get i-th dynamic object in the server

    - #### remove

          public void remove(int i)

    - #### remove

          public void remove(IDynamics d)

    - #### clear

          public void clear()

    - #### duration

          public IDynamicServer duration(int dur)

    - #### duration

          public int duration()

    - #### time

          public IDynamicServer time(int tm)

    - #### time

          public int time()

    - #### showTime

          public IDynamicServer showTime(boolean flag)

    - #### pause

          public void pause()

    - #### resume

          public void resume()

    - #### isRunning

          public boolean isRunning()

    - #### start

          public void start()

    - #### startWithoutThread

          public void startWithoutThread()

    - #### stop

          public void stop()

    - #### reset

          public void reset()

      in case dynamicServer need to start again after stopped.

    - #### step

          public void step()

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`