net.sf.jradius.server
Class Listener

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.jradius.server.JRadiusThread
          extended by net.sf.jradius.server.Listener
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
FreeRadiusListener, WebServiceListener

public abstract class Listener
extends JRadiusThread

The base abstract class of all Listeners

Author:
Gert Jan Verhoog, David Bird

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  ListenerConfigurationItem config
           
protected  ObjectQueue queue
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Listener(ListenerConfigurationItem cfg)
           
 
Method Summary
 void doneWithRequest(ListenerRequest listenerRequest)
           
 boolean isActive()
           
 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 setListenerConfigurationItem(ListenerConfigurationItem cfg)
          Sets the listeners ConfigurationItem
 void setRequestQueue(ObjectQueue q)
          Sets the request queue for this listener
 
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
 

Field Detail

queue

protected ObjectQueue queue

config

protected ListenerConfigurationItem config
Constructor Detail

Listener

public Listener(ListenerConfigurationItem cfg)
         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
Method Detail

setRequestQueue

public void setRequestQueue(ObjectQueue q)
Sets the request queue for this 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
Listen for one object and place it on the request queue

Throws:
java.io.IOException

isActive

public boolean isActive()

setActive

public void setActive(boolean active)

doneWithRequest

public void doneWithRequest(ListenerRequest listenerRequest)
                     throws java.io.IOException
Throws:
java.io.IOException

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()


Copyright © 2006 The JRadius Project, All Rights Reserved.