frysk.proc.live
Class LinuxPtraceHost

java.lang.Object
  extended by frysk.proc.Host
      extended by frysk.proc.live.LinuxPtraceHost
All Implemented Interfaces:
Comparable

public class LinuxPtraceHost
extends Host

A Linux Host tracked using PTRACE.


Constructor Summary
LinuxPtraceHost(EventLoop eventLoop)
          Construct an instance of the LinuxPtraceHost that uses the specified eventLoop.
 
Method Summary
 String getName()
          Returns the name of the host
 Proc getSelf()
          Return a pointer to this frysk instance.
 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 requestProc(int theProcId, FindProc theFinder)
          Find a specifc process from its Id.
 void requestRefresh(Collection knownProcesses, HostRefreshBuilder updates)
          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).
 
Methods inherited from class frysk.proc.Host
compareTo, requestCreateAttachedProc, requestCreateAttachedProc, requestCreateAttachedProc, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinuxPtraceHost

public LinuxPtraceHost(EventLoop eventLoop)
Construct an instance of the LinuxPtraceHost that uses the specified eventLoop.

Method Detail

requestRefresh

public void requestRefresh(Collection knownProcesses,
                           HostRefreshBuilder updates)
Description copied from class: Host
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).

Specified by:
requestRefresh in class Host

requestProc

public void requestProc(int theProcId,
                        FindProc theFinder)
Description copied from class: Host
Find a specifc process from its Id.

Specified by:
requestProc in class Host

requestCreateAttachedProc

public void requestCreateAttachedProc(File exe,
                                      String stdin,
                                      String stdout,
                                      String stderr,
                                      String[] args,
                                      String libs,
                                      TaskAttachedObserverXXX attachedObserver)
Description copied from class: Host
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.

Specified by:
requestCreateAttachedProc in class Host

getSelf

public Proc getSelf()
Return a pointer to this frysk instance.

Specified by:
getSelf in class Host

getName

public String getName()
Description copied from class: Host
Returns the name of the host

Specified by:
getName in class Host