public abstract class TCPListener extends JRadiusThread implements Listener
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active |
protected int |
backlog |
protected ListenerConfigurationItem |
config |
protected boolean |
keepAlive |
protected List<KeepAliveListener> |
keepAliveListeners |
protected org.apache.commons.logging.Log |
log |
protected int |
port |
protected BlockingQueue<ListenerRequest> |
queue |
protected org.apache.commons.pool.ObjectPool |
requestObjectPool |
protected boolean |
requiresSSL |
protected ServerSocket |
serverSocket |
protected String[] |
sslEnabledCiphers |
protected String[] |
sslEnabledProtocols |
protected boolean |
sslNeedClientAuth |
protected boolean |
sslWantClientAuth |
protected boolean |
usingSSL |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TCPListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
deadKeepAliveListener(KeepAliveListener keepAliveListener) |
boolean |
getActive() |
boolean |
isKeepAlive() |
boolean |
isUsingSSL() |
void |
listen()
Listen for one object and place it on the request queue
|
void |
run()
The thread's run method repeatedly calls listen()
|
void |
setActive(boolean active) |
void |
setBacklog(int backlog) |
void |
setConfiguration(ListenerConfigurationItem cfg) |
void |
setConfiguration(ListenerConfigurationItem cfg,
boolean noKeepAlive) |
void |
setKeepAlive(boolean keepAlive) |
void |
setListenerConfigurationItem(ListenerConfigurationItem cfg)
Sets the listeners ConfigurationItem
|
void |
setPort(int port) |
void |
setRequestQueue(BlockingQueue<ListenerRequest> q)
Sets the request queue for this listener
|
void |
setUsingSSL(boolean usingSSL) |
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, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, parseRequest, start, stopprotected org.apache.commons.logging.Log log
protected boolean active
protected ListenerConfigurationItem config
protected BlockingQueue<ListenerRequest> queue
protected int port
protected int backlog
protected boolean requiresSSL
protected boolean usingSSL
protected boolean keepAlive
protected ServerSocket serverSocket
protected final List<KeepAliveListener> keepAliveListeners
protected boolean sslWantClientAuth
protected boolean sslNeedClientAuth
protected String[] sslEnabledProtocols
protected String[] sslEnabledCiphers
protected org.apache.commons.pool.ObjectPool requestObjectPool
public void setConfiguration(ListenerConfigurationItem cfg)
setConfiguration in interface Listenerpublic void setConfiguration(ListenerConfigurationItem cfg, boolean noKeepAlive) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException, IOException
public void setRequestQueue(BlockingQueue<ListenerRequest> q)
setRequestQueue in interface Listenerq - the RequestQueue;public void setListenerConfigurationItem(ListenerConfigurationItem cfg)
cfg - a configuration itempublic void listen()
throws Exception
public void deadKeepAliveListener(KeepAliveListener keepAliveListener)
public void run()
public boolean isUsingSSL()
public boolean isKeepAlive()
public void setBacklog(int backlog)
public void setKeepAlive(boolean keepAlive)
public void setPort(int port)
public void setUsingSSL(boolean usingSSL)
Copyright © 2017. All rights reserved.