public abstract class HttpListener extends ServiceModule
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ipAddress
The IP Address to bond to
|
protected java.util.concurrent.ExecutorService |
listenerPool
Thread pool
|
protected int |
port
The port to listen on
|
protected long |
timeOut
Timeout for receiving continuous message
|
shutDown
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
HttpListener(int thePort,
java.lang.String theIpAddress,
long theTimeOut,
java.lang.String theServerPassword,
java.lang.String theAdminKey)
Create a new instance of HttpListener.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
closeListener()
Close the listener down
|
abstract void |
initRequestListener()
Initialise the request listener thread.
|
void |
shutDownListenerThread()
Shut down the request listener thread.
|
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, run, 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 int port
protected java.lang.String ipAddress
protected long timeOut
protected java.util.concurrent.ExecutorService listenerPool
public HttpListener(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 abstract void initRequestListener() throws java.io.IOException, java.lang.Exception
java.io.IOException
- for input/output error.java.lang.Exception
- any other error.protected abstract void closeListener()
public void shutDownListenerThread()