net.jradius.server
Class Processor

java.lang.Object
  extended by java.lang.Thread
      extended by net.jradius.server.JRadiusThread
          extended by net.jradius.server.Processor
All Implemented Interfaces:
java.lang.Runnable, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
RadiusProcessor

public abstract class Processor
extends JRadiusThread
implements org.springframework.context.ApplicationContextAware

Base abstract class of all Processors

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  org.springframework.context.ApplicationContext applicationContext
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Processor()
           
 
Method Summary
 org.springframework.context.ApplicationContext getApplicationContext()
           
 EventDispatcher getEventDispatcher()
           
 java.util.List<JRCommand> getRequestHandlers()
           
 java.util.concurrent.BlockingQueue getRequestQueue()
           
 boolean isActive()
           
 void process()
           
protected abstract  void processRequest(ListenerRequest listenerRequest)
           
 void run()
           
 void setActive(boolean active)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setEventDispatcher(EventDispatcher eventDispatcher)
           
 void setRequestHandlers(java.util.List<JRCommand> handlers)
           
 void setRequestQueue(java.util.concurrent.BlockingQueue<ListenerRequest> 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

applicationContext

protected org.springframework.context.ApplicationContext applicationContext
Constructor Detail

Processor

public Processor()
Method Detail

setRequestQueue

public void setRequestQueue(java.util.concurrent.BlockingQueue<ListenerRequest> q)
Sets the request queue for this listener

Parameters:
q - the RequestQueue;

getRequestQueue

public java.util.concurrent.BlockingQueue getRequestQueue()

getEventDispatcher

public EventDispatcher getEventDispatcher()

setEventDispatcher

public void setEventDispatcher(EventDispatcher eventDispatcher)

setRequestHandlers

public void setRequestHandlers(java.util.List<JRCommand> handlers)

getRequestHandlers

public java.util.List<JRCommand> getRequestHandlers()

processRequest

protected abstract void processRequest(ListenerRequest listenerRequest)
                                throws java.io.IOException,
                                       RadiusException
Throws:
java.io.IOException
RadiusException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

process

public void process()
             throws java.lang.Exception,
                    java.lang.InterruptedException
Throws:
java.lang.Exception
java.lang.InterruptedException

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware

isActive

public boolean isActive()

setActive

public void setActive(boolean active)


Copyright © 2008 JRadius Project, All Rights Reserved.