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
|
shutDownpasswordHandler, service, serviceTypejarFile, 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, setShutDowncanAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceTypegetJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveStateactiveCount, 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, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUUID, setJarFile, setUUIDprotected 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()