org.miv.pherd
Class ParticleBoxRunner

java.lang.Object
  extended by org.miv.pherd.ParticleBoxRunner
All Implemented Interfaces:
Runnable, org.miv.mbox.MBoxListener

Deprecated.

@Deprecated
public class ParticleBoxRunner
extends Object
implements Runnable, org.miv.mbox.MBoxListener

Allows to put a ParticleBox inside a thread and to receive and send events safely.

Since:
2007
Author:
Antoine Dutot

Nested Class Summary
static class ParticleBoxRunner.InputProtocol
          Deprecated. Messages understood by this runner.
static class ParticleBoxRunner.OutputProtocol
          Deprecated. Messages output by this object.
static class ParticleBoxRunner.ParticleBoxListenerAdaptater
          Deprecated. This class can listen at the events sent by a particle box and send them to an arbitrary (and eventually remote) message box.
 
Field Summary
protected  org.miv.mbox.MBoxStandalone inbox
          Deprecated. The input message box.
protected  boolean loop
          Deprecated. This thread runs while this attribute is true.
protected  ParticleBox pbox
          Deprecated. The particles and their environment.
protected  ParticleFactory pfactory
          Deprecated. How to create particles?.
protected  int sleepMs
          Deprecated. Time to wait between each particle box step in milliseconds.
 
Constructor Summary
ParticleBoxRunner(int pmax, CellSpace space, CellData rootData, ParticleFactory pfactory)
          Deprecated.  
 
Method Summary
 org.miv.mbox.MBox getInbox()
          Deprecated. The input message box of this runner.
 ParticleBox getParticleBox()
          Deprecated. The contained particle box.
 void processMessage(String from, Object[] data)
          Deprecated.  
 void run()
          Deprecated. Run the step() method in a loop.
 void setPriority(int ms)
          Deprecated. Set the time to sleep between each step in milliseconds.
protected  void sleep(int ms)
          Deprecated.  
 void start()
          Deprecated. Start a new thread that run this runner.
 void step()
          Deprecated. Do one step of the iterative particle algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pbox

protected ParticleBox pbox
Deprecated. 
The particles and their environment.


inbox

protected org.miv.mbox.MBoxStandalone inbox
Deprecated. 
The input message box.


sleepMs

protected int sleepMs
Deprecated. 
Time to wait between each particle box step in milliseconds.


loop

protected boolean loop
Deprecated. 
This thread runs while this attribute is true.


pfactory

protected ParticleFactory pfactory
Deprecated. 
How to create particles?.

Constructor Detail

ParticleBoxRunner

public ParticleBoxRunner(int pmax,
                         CellSpace space,
                         CellData rootData,
                         ParticleFactory pfactory)
Deprecated. 
Method Detail

getInbox

public org.miv.mbox.MBox getInbox()
Deprecated. 
The input message box of this runner. Send all commands that modify the particle box into this message box if your process runs in another thread.

Returns:
The particle box message box.

getParticleBox

public ParticleBox getParticleBox()
Deprecated. 
The contained particle box.

Returns:
The particle box.

setPriority

public void setPriority(int ms)
Deprecated. 
Set the time to sleep between each step in milliseconds.


processMessage

public void processMessage(String from,
                           Object[] data)
Deprecated. 
Specified by:
processMessage in interface org.miv.mbox.MBoxListener

start

public void start()
Deprecated. 
Start a new thread that run this runner. Be careful, calling several times this method will launch several threads.


run

public void run()
Deprecated. 
Run the step() method in a loop.

Specified by:
run in interface Runnable

step

public void step()
Deprecated. 
Do one step of the iterative particle algorithm.


sleep

protected void sleep(int ms)
Deprecated. 


Copyright © 2011. All Rights Reserved.