frysk.proc
Class Host

java.lang.Object
  extended by frysk.proc.Host
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
DeadHost, DummyHost, LiveHost

public abstract class Host
extends Object
implements Comparable

A host machine. A HOST has processes which contain threads. A HOST also has a process that is running this code - frysk is self aware.


Field Summary
private static Log fine
           
 
Constructor Summary
protected Host()
          The host corresponds to a specific system.
 
Method Summary
 int compareTo(Object o)
           
abstract  String getName()
          Returns the name of the host
abstract  Proc getSelf()
          Return the process corresponding to this running frysk instance found on this host.
abstract  void requestCreateAttachedProc(File exe, String stdin, String stdout, String stderr, String[] args, String libs, TaskAttachedObserverXXX attachedObserver)
          Tell the host to create a running child process.
 void requestCreateAttachedProc(Proc template, TaskAttachedObserverXXX attachedObserver)
          Request that a new attached and running process based on TEMPLATE be created.
 void requestCreateAttachedProc(String[] args, TaskAttachedObserverXXX attachedObserver)
          Request that a new attached and running process(with stdin, stdout, and stderr are shared with this process) be created.
 void requestCreateAttachedProc(String stdin, String stdout, String stderr, String[] args, TaskAttachedObserverXXX attachedObserver)
          Request that a new attached and running process(with stdin, stdout, and stderr are shared with this process) be created.
abstract  void requestProc(int pid, FindProc finder)
          Find a specifc process from its Id.
abstract  void requestRefresh(Collection knownProcesses, HostRefreshBuilder update)
          Given a set of knownProcesses and knownDaemons (children of init) scan the system passing back the set of newProcesses (not in knownProcesses), deadProcesses (were in knownProcesses but exited), newDaemons (processes that re-parented to init).
 String toString()
          Print this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fine

private static final Log fine
Constructor Detail

Host

protected Host()
The host corresponds to a specific system.

Method Detail

requestProc

public abstract void requestProc(int pid,
                                 FindProc finder)
Find a specifc process from its Id.


requestRefresh

public abstract void requestRefresh(Collection knownProcesses,
                                    HostRefreshBuilder update)
Given a set of knownProcesses and knownDaemons (children of init) scan the system passing back the set of newProcesses (not in knownProcesses), deadProcesses (were in knownProcesses but exited), newDaemons (processes that re-parented to init).


requestCreateAttachedProc

public abstract void requestCreateAttachedProc(File exe,
                                               String stdin,
                                               String stdout,
                                               String stderr,
                                               String[] args,
                                               String libs,
                                               TaskAttachedObserverXXX attachedObserver)
Tell the host to create a running child process. Unlike other requests, this operation is bound to an explicit call-back. Doing this means that the requester has a robust way of receiving an acknowledge of the operation. Without this there would be no reliable way to bind to the newly created process - frysk's state machine could easily detach before the requester had an opportunity to add an attached observer.


requestCreateAttachedProc

public void requestCreateAttachedProc(String stdin,
                                      String stdout,
                                      String stderr,
                                      String[] args,
                                      TaskAttachedObserverXXX attachedObserver)
Request that a new attached and running process(with stdin, stdout, and stderr are shared with this process) be created.


requestCreateAttachedProc

public void requestCreateAttachedProc(String[] args,
                                      TaskAttachedObserverXXX attachedObserver)
Request that a new attached and running process(with stdin, stdout, and stderr are shared with this process) be created.


requestCreateAttachedProc

public void requestCreateAttachedProc(Proc template,
                                      TaskAttachedObserverXXX attachedObserver)
Request that a new attached and running process based on TEMPLATE be created.


getSelf

public abstract Proc getSelf()
Return the process corresponding to this running frysk instance found on this host.


toString

public String toString()
Print this.

Overrides:
toString in class Object

getName

public abstract String getName()
Returns the name of the host


compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable