public class BlockingListener extends HttpListener
Modifier and Type | Field and Description |
---|---|
protected java.nio.channels.ServerSocketChannel |
listener
Synchronous server channel
|
ipAddress, listenerPool, port, timeOut
shutDown
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
BlockingListener(int thePort,
java.lang.String theIpAddress,
long theTimeOut,
java.lang.String theServerPassword,
java.lang.String theAdminKey)
Create a new instance of BlockingListener.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeListener()
Close the listener down
|
void |
initRequestListener()
Initialise the request listener thread.
|
void |
run()
Run the thread.
|
shutDownListenerThread
getShutDown, interrupt, setShutDown, setShutDown
canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType
getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUUID, setJarFile, setUUID
protected java.nio.channels.ServerSocketChannel listener
public BlockingListener(int thePort, java.lang.String theIpAddress, long theTimeOut, java.lang.String theServerPassword, java.lang.String theAdminKey) throws java.lang.Exception
thePort
- the port to listen on.theIpAddress
- the ip address to bind to.theTimeOut
- timeout for receiving continuous message.theServerPassword
- the server password.theAdminKey
- the server service key.java.lang.Exception
- any other error.public void initRequestListener() throws java.lang.Exception
initRequestListener
in class HttpListener
java.lang.Exception
- any other error.java.io.IOException
- for input/output error.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void closeListener()
closeListener
in class HttpListener