public class AlgorithmRMIServer
extends java.lang.Thread
run()
method, which can
be run in a separate thread or directly by the caller.Constructor and Description |
---|
AlgorithmRMIServer(Algorithm algorithm,
int port,
boolean clearSurplusData)
Creates a new instance of AlgorithmRMIServer listening on the specified port.
|
Modifier and Type | Method and Description |
---|---|
Algorithm |
getAlgorithm()
Returns the encapsulated algorithm.
|
int |
getPort()
Returns the TCP port of this RMI service.
|
void |
run()
Waits for incoming connections and start a new thread for each.
|
activeCount, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public AlgorithmRMIServer(Algorithm algorithm, int port, boolean clearSurplusData) throws java.lang.NullPointerException, java.io.IOException
algorithm
- the algorithm to encapsulateport
- the TCP port of the RMI serviceclearSurplusData
- flag whether to clear surplus data on returned Clearable
objectsjava.lang.NullPointerException
- if the specified algorithm is nulljava.io.IOException
- if the RMI service cannot be opened on the specified portpublic Algorithm getAlgorithm()
public int getPort()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread