org.gnu6.six
Class move

java.lang.Object
  |
  +--org.gnu6.six.move
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
runMlist

public abstract class move
extends java.lang.Object
implements java.lang.Runnable

Abstract class move provides a prototype for the basic building blocks of GNU6 environment.


Field Summary
protected  org.gnu6.six.State currentState
           
protected  org.gnu6.six.move myInstance
           
protected  java.lang.String myName
           
protected  java.lang.ThreadGroup myThreadGroup
           
protected  java.util.Hashtable parameters
           
protected  java.lang.Thread thisThread
           
 
Constructor Summary
move()
           
 
Method Summary
 int activeCount()
          Returns count of all active neighbour threads in the group that contains the current move.
 void amIsuspended()
           
 java.lang.ThreadGroup[] enumerateThreadGroups()
           
 java.lang.Thread[] enumerateThreads()
           
 java.lang.String getLogFile()
          Returns the log-file for the current move
 java.lang.String getLogStatus()
          Returns the log-file status for the current move
 java.lang.String getName()
           
 java.util.Hashtable getParameters()
          Returns parameters of the current move
 org.gnu6.six.move getParent()
           
 org.gnu6.six.State getState()
          Returns the state of the current project.
 void interrupt()
           
 void interruptAll()
          This method is used to iterrupt all threads from the current thread group.
 boolean isAlive()
           
 boolean isItSuspended()
           
 void join()
          This method is the same as the one from the Thread class
 void resume()
           
 void setAlive(boolean st)
           
 void setDaemon(boolean on)
           
 void setInstance(org.gnu6.six.move newInstance)
          Sets the instance of the move.
 void setLogFile(java.lang.String LogF)
          Sets the log-file which will be used by this move
 void setLogStatus(java.lang.String LogF)
          Sets the log-file status which will be used by this move
 void setName(java.lang.String newName)
          Assigns a name to the move
 void setParameters(java.util.Hashtable ht)
          Sets parameters for the current move.
 void setParent(org.gnu6.six.move Parent)
           
 void setState(org.gnu6.six.State st)
          Sets the state of the current project.
 void setThread(java.lang.Thread newThread)
          Assigns a Thread to the move
 void setThreadGroup(java.lang.ThreadGroup newGroup)
          Assigns a ThreadGroup to the move
 void sleep(int time)
          This method is the same as the one from the Thread class
 void start()
          Starts execution of the current move.
 void stop()
          Prepares move for the future garbage collection
 void stopAll()
          This method is used to stop all threads from the current thread group.
 void suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

parameters

protected java.util.Hashtable parameters

currentState

protected org.gnu6.six.State currentState

myInstance

protected org.gnu6.six.move myInstance

myThreadGroup

protected java.lang.ThreadGroup myThreadGroup

thisThread

protected java.lang.Thread thisThread

myName

protected java.lang.String myName
Constructor Detail

move

public move()
Method Detail

amIsuspended

public void amIsuspended()
                  throws java.lang.InterruptedException
java.lang.InterruptedException

isAlive

public boolean isAlive()

setAlive

public void setAlive(boolean st)

suspend

public void suspend()

resume

public void resume()

isItSuspended

public boolean isItSuspended()

setParent

public void setParent(org.gnu6.six.move Parent)

getParent

public org.gnu6.six.move getParent()

setDaemon

public void setDaemon(boolean on)

getName

public java.lang.String getName()

setState

public void setState(org.gnu6.six.State st)
Sets the state of the current project.

Parameters:
st - State of the current project
See Also:
State

getState

public org.gnu6.six.State getState()
Returns the state of the current project.

Returns:
State - state of the current project.
See Also:
State

setParameters

public void setParameters(java.util.Hashtable ht)
Sets parameters for the current move.


getParameters

public java.util.Hashtable getParameters()
Returns parameters of the current move


setLogFile

public void setLogFile(java.lang.String LogF)
Sets the log-file which will be used by this move


setLogStatus

public void setLogStatus(java.lang.String LogF)
Sets the log-file status which will be used by this move


getLogFile

public java.lang.String getLogFile()
Returns the log-file for the current move


getLogStatus

public java.lang.String getLogStatus()
Returns the log-file status for the current move


stop

public void stop()
Prepares move for the future garbage collection


setName

public void setName(java.lang.String newName)
Assigns a name to the move


setThreadGroup

public void setThreadGroup(java.lang.ThreadGroup newGroup)
Assigns a ThreadGroup to the move


setThread

public void setThread(java.lang.Thread newThread)
Assigns a Thread to the move


sleep

public void sleep(int time)
           throws java.lang.InterruptedException
This method is the same as the one from the Thread class

java.lang.InterruptedException

join

public void join()
          throws java.lang.InterruptedException
This method is the same as the one from the Thread class

java.lang.InterruptedException

start

public void start()
           throws java.lang.Exception
Starts execution of the current move.

java.lang.Exception

setInstance

public void setInstance(org.gnu6.six.move newInstance)
Sets the instance of the move.


activeCount

public int activeCount()
Returns count of all active neighbour threads in the group that contains the current move.


stopAll

public void stopAll()
This method is used to stop all threads from the current thread group.


interruptAll

public void interruptAll()
This method is used to iterrupt all threads from the current thread group.


interrupt

public void interrupt()

enumerateThreads

public java.lang.Thread[] enumerateThreads()

enumerateThreadGroups

public java.lang.ThreadGroup[] enumerateThreadGroups()