net.jradius.server
Class TCPListener
java.lang.Object
java.lang.Thread
net.jradius.server.JRadiusThread
net.jradius.server.TCPListener
- All Implemented Interfaces:
- java.lang.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
Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
config
protected ListenerConfigurationItem config
queue
protected java.util.concurrent.BlockingQueue<ListenerRequest> queue
TCPListener
public TCPListener()
parseRequest
public abstract JRadiusEvent parseRequest(java.io.InputStream inputStream)
throws java.io.IOException,
RadiusException
- Specified by:
parseRequest
in interface Listener
- Throws:
java.io.IOException
RadiusException
setConfiguration
public void setConfiguration(ListenerConfigurationItem cfg)
- Specified by:
setConfiguration
in interface Listener
setConfiguration
public void setConfiguration(ListenerConfigurationItem cfg,
boolean noKeepAlive)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateException,
java.security.UnrecoverableKeyException,
java.security.KeyManagementException,
java.io.IOException
- Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
java.security.UnrecoverableKeyException
java.security.KeyManagementException
java.io.IOException
setRequestQueue
public void setRequestQueue(java.util.concurrent.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 java.io.IOException,
java.lang.InterruptedException,
RadiusException
- Listen for one object and place it on the request queue
- Throws:
java.io.IOException
java.lang.InterruptedException
RadiusException
deadKeepAliveListener
public void deadKeepAliveListener(KeepAliveListener keepAliveListener)
isActive
public boolean isActive()
setActive
public void setActive(boolean active)
run
public void run()
- The thread's run method repeatedly calls listen()
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class java.lang.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 © 2008 JRadius Project, All Rights Reserved.