sod.client
Class ProcessorImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--sod.client.ProcessorImpl
All Implemented Interfaces:
Processor, java.rmi.Remote, java.io.Serializable

public class ProcessorImpl
extends java.rmi.server.UnicastRemoteObject
implements Processor

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ProcessorImpl(java.lang.String serverName)
           
 
Method Summary
 void delProcess(int pid)
           
 void execute(Process process)
           
 void exit(long delay)
           
 java.lang.String getHostAddress()
           
 java.lang.String getHostName()
           
 int getNumProcesses()
           
 int[] getPIDs(int numProcesses)
          For simplicity, returns only the pids of numProcesses processes.
 java.util.Vector getProcesses()
           
 int getScore()
           
 java.lang.String getServerName()
           
static void main(java.lang.String[] args)
           
 Process suspendProcess(int pid)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessorImpl

public ProcessorImpl(java.lang.String serverName)
              throws java.rmi.RemoteException
Method Detail

getHostName

public java.lang.String getHostName()
Specified by:
getHostName in interface Processor

getHostAddress

public java.lang.String getHostAddress()

getServerName

public java.lang.String getServerName()
Specified by:
getServerName in interface Processor

execute

public void execute(Process process)
             throws java.rmi.RemoteException
Specified by:
execute in interface Processor

getScore

public int getScore()
             throws java.rmi.RemoteException
Specified by:
getScore in interface Processor

getNumProcesses

public int getNumProcesses()
                    throws java.rmi.RemoteException
Specified by:
getNumProcesses in interface Processor

exit

public void exit(long delay)
          throws java.rmi.RemoteException
Specified by:
exit in interface Processor

getProcesses

public java.util.Vector getProcesses()
                              throws java.rmi.RemoteException
Specified by:
getProcesses in interface Processor

getPIDs

public int[] getPIDs(int numProcesses)
              throws java.rmi.RemoteException
For simplicity, returns only the pids of numProcesses processes.
Specified by:
getPIDs in interface Processor

delProcess

public void delProcess(int pid)
                throws java.rmi.RemoteException
Specified by:
delProcess in interface Processor

suspendProcess

public Process suspendProcess(int pid)
                       throws java.rmi.RemoteException
Specified by:
suspendProcess in interface Processor

main

public static void main(java.lang.String[] args)