physis.core
Class DigitalOrganismProxy

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--physis.core.DigitalOrganismProxy
All Implemented Interfaces:
java.lang.Runnable

public class DigitalOrganismProxy
extends java.lang.Thread

This class functions as a server. It provides access to an array of DigitalOrganisms. It runs as a separate thread.


Field Summary
protected  java.net.Socket client
           
static java.lang.String FITNESS
           
protected  java.io.BufferedReader in
           
private static InstructionSet instruction_set
           
static java.lang.String MERIT
           
protected  DigitalOrganism[] orgs
           
protected  java.io.PrintWriter out
           
protected  java.net.ServerSocket server
           
static java.lang.String VIVIFY
           
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ
 
Constructor Summary
DigitalOrganismProxy(int port_number, DigitalOrganism[] local_orgs)
           
 
Method Summary
protected  void fitness(int index)
          Writes to the socket the organism's fitness.
protected  void merit(int index)
          Writes to the socket the organism's fitness.
 void run()
           
protected  void vivify(int index)
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instruction_set

private static InstructionSet instruction_set

orgs

protected DigitalOrganism[] orgs

server

protected java.net.ServerSocket server

client

protected java.net.Socket client

in

protected java.io.BufferedReader in

out

protected java.io.PrintWriter out

FITNESS

public static java.lang.String FITNESS

MERIT

public static java.lang.String MERIT

VIVIFY

public static java.lang.String VIVIFY
Constructor Detail

DigitalOrganismProxy

public DigitalOrganismProxy(int port_number,
                            DigitalOrganism[] local_orgs)
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

fitness

protected void fitness(int index)
                throws java.io.IOException
Writes to the socket the organism's fitness.
Parameters:
index - The index of the organism.

merit

protected void merit(int index)
              throws java.io.IOException
Writes to the socket the organism's fitness.
Parameters:
index - The index of the organism.

vivify

protected void vivify(int index)
               throws java.io.IOException