net.jradius.server
Class TCPListener
java.lang.Object
java.lang.Thread
net.jradius.server.JRadiusThread
net.jradius.server.TCPListener
- All Implemented Interfaces:
- Runnable, Listener
- Direct Known Subclasses:
- FreeRadiusListener
public abstract class TCPListener
- extends JRadiusThread
- implements Listener
The base abstract class of all Listeners
- Author:
- Gert Jan Verhoog, David Bird
Methods inherited from class java.lang.Thread |
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 |
log
protected org.apache.commons.logging.Log log
active
protected boolean active
config
protected ListenerConfigurationItem config
queue
protected BlockingQueue<ListenerRequest> queue
port
protected int port
backlog
protected int backlog
requiresSSL
protected boolean requiresSSL
usingSSL
protected boolean usingSSL
keepAlive
protected boolean keepAlive
serverSocket
protected ServerSocket serverSocket
keepAliveListeners
protected final List<KeepAliveListener> keepAliveListeners
sslWantClientAuth
protected boolean sslWantClientAuth
sslNeedClientAuth
protected boolean sslNeedClientAuth
sslEnabledProtocols
protected String[] sslEnabledProtocols
sslEnabledCiphers
protected String[] sslEnabledCiphers
requestObjectPool
protected org.apache.commons.pool.ObjectPool requestObjectPool
TCPListener
public TCPListener()
setConfiguration
public void setConfiguration(ListenerConfigurationItem cfg)
- Specified by:
setConfiguration
in interface Listener
setConfiguration
public void setConfiguration(ListenerConfigurationItem cfg,
boolean noKeepAlive)
throws KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
UnrecoverableKeyException,
KeyManagementException,
IOException
- Throws:
KeyStoreException
NoSuchAlgorithmException
CertificateException
UnrecoverableKeyException
KeyManagementException
IOException
setRequestQueue
public void setRequestQueue(BlockingQueue<ListenerRequest> q)
- Sets the request queue for this listener
- Specified by:
setRequestQueue
in interface Listener
- Parameters:
q
- the RequestQueue;
setListenerConfigurationItem
public void setListenerConfigurationItem(ListenerConfigurationItem cfg)
- Sets the listeners ConfigurationItem
- Parameters:
cfg
- a configuration item
listen
public void listen()
throws Exception
- Listen for one object and place it on the request queue
- Throws:
IOException
InterruptedException
RadiusException
Exception
deadKeepAliveListener
public void deadKeepAliveListener(KeepAliveListener keepAliveListener)
getActive
public boolean getActive()
- Specified by:
getActive
in interface Listener
setActive
public void setActive(boolean active)
- Specified by:
setActive
in interface Listener
run
public void run()
- The thread's run method repeatedly calls listen()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
isUsingSSL
public boolean isUsingSSL()
isKeepAlive
public boolean isKeepAlive()
setBacklog
public void setBacklog(int backlog)
setKeepAlive
public void setKeepAlive(boolean keepAlive)
setPort
public void setPort(int port)
setUsingSSL
public void setUsingSSL(boolean usingSSL)
Copyright © 2011 Coova Technologies, LLC, All Rights Reserved.