erjang
Class ETask<H extends EHandle>

java.lang.Object
  extended by kilim.Task
      extended by erjang.ETask<H>
Direct Known Subclasses:
EDriverTask, EProc

public abstract class ETask<H extends EHandle>
extends kilim.Task

An ETask is what is common for processes and open ports


Nested Class Summary
protected static class ETask.State
           
 
Field Summary
protected static EAtom am_java_exception
           
protected static EAtom am_normal
           
protected  EObject exit_reason
           
protected  java.util.Set<EHandle> links
           
protected   mbox
           
protected  java.util.Map<ERef,ETuple2> monitors
           
protected  ETask.State pstate
           
 
Constructor Summary
ETask()
           
 
Method Summary
 ERef add_monitor(EPID target, EObject object)
           
 void check_exit()
          will check if this process have received an exit signal (and we're not trapping)
 void checkKill()
           
protected  void do_proc_termination(EObject exit_reason)
           
 boolean exists()
           
protected  void link_failure(EHandle h)
           
 void link_oneway(EHandle h)
           
 void link_to(EHandle handle)
           
 void link_to(ETask<?> task)
           
 void mbox_remove_one()
           
 void mbox_send(EObject msg)
           
 void mbox_wait()
           
 boolean mbox_wait(long timeoutMillis)
           
  mbox()
           
protected abstract  void process_incoming_exit(EHandle from, EObject reason)
           
 void remove_monitor(ERef r, boolean flush)
           
abstract  H self_handle()
           
 void send_exit(EHandle from, EObject reason)
           
 void unlink(EHandle handle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

am_normal

protected static final EAtom am_normal

am_java_exception

protected static final EAtom am_java_exception

links

protected java.util.Set<EHandle> links

monitors

protected java.util.Map<ERef,ETuple2> monitors

mbox

protected  mbox

pstate

protected ETask.State pstate

exit_reason

protected EObject exit_reason
Constructor Detail

ETask

public ETask()
Method Detail

self_handle

public abstract H self_handle()
Returns:

unlink

public void unlink(EHandle handle)

link_to

public void link_to(ETask<?> task)
             throws Pausable
Parameters:
task -
Throws:
Pausable

link_to

public void link_to(EHandle handle)
             throws Pausable
Throws:
Pausable

link_oneway

public void link_oneway(EHandle h)
                 throws Pausable
Throws:
Pausable

link_failure

protected void link_failure(EHandle h)
                     throws Pausable
Parameters:
h -
Throws:
Pausable
Pausable

do_proc_termination

protected void do_proc_termination(EObject exit_reason)
                            throws Pausable
Throws:
Pausable

add_monitor

public ERef add_monitor(EPID target,
                        EObject object)
Parameters:
self2 -
Returns:

remove_monitor

public void remove_monitor(ERef r,
                           boolean flush)
Parameters:
r -

mbox_wait

public void mbox_wait()
               throws Pausable
Throws:
Pausable

mbox_wait

public boolean mbox_wait(long timeoutMillis)
                  throws Pausable
Parameters:
longValue -
Throws:
Pausable

mbox_send

public void mbox_send(EObject msg)
               throws Pausable
Parameters:
msg -
Throws:
Pausable

mbox_remove_one

public void mbox_remove_one()
                     throws Pausable
Throws:
Pausable

send_exit

public final void send_exit(EHandle from,
                            EObject reason)
                     throws Pausable
Parameters:
from -
reason -
Throws:
Pausable

process_incoming_exit

protected abstract void process_incoming_exit(EHandle from,
                                              EObject reason)
                                       throws Pausable
Throws:
Pausable

check_exit

public final void check_exit()
will check if this process have received an exit signal (and we're not trapping)


checkKill

public void checkKill()

mbox

public  mbox()
Returns:

exists

public boolean exists()
Returns:


TBD erjang license note