OSMQ
v2.0.1

osmq.util
Class AbstractThreadable

java.lang.Object
  extended byosmq.util.AbstractThreadable
All Implemented Interfaces:
ExceptionListener, Threadable

public abstract class AbstractThreadable
extends java.lang.Object
implements Threadable

Base class for objects that need a seperate thread to iteratively perform a task.


Field Summary
 
Fields inherited from interface osmq.util.Threadable
HIGH_PRIORITY, INCREASED_PRIORITY, VERY_HIGH_PRIORITY
 
Constructor Summary
AbstractThreadable()
           
 
Method Summary
 void close()
           
 ExceptionListener getExceptionListener()
          Return the ExceptionListener that will be notified when there is an exception due to an I/O or communications failure.
 int getPriority()
           
abstract  void initializer()
           
 void onException(java.lang.Exception e)
          Notify user of an exception.
 void open()
           
abstract  boolean repeatProcess()
           
 void setExceptionListener(ExceptionListener listener)
          Sets an ExceptionListener that will be notified when there is an exception due to an inability to an I/O or communications failure.
 boolean shutdownRequested()
           
abstract  void terminationProcess()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface osmq.util.Threadable
repeatableProcess
 

Constructor Detail

AbstractThreadable

public AbstractThreadable()
Method Detail

initializer

public abstract void initializer()
                          throws java.lang.Exception
Throws:
java.lang.Exception

repeatProcess

public abstract boolean repeatProcess()
                               throws java.lang.Exception
Throws:
java.lang.Exception

terminationProcess

public abstract void terminationProcess()

getPriority

public int getPriority()
Specified by:
getPriority in interface Threadable

open

public void open()

close

public void close()

onException

public void onException(java.lang.Exception e)
Description copied from interface: ExceptionListener
Notify user of an exception.

Specified by:
onException in interface ExceptionListener
Parameters:
e - the exception.

shutdownRequested

public boolean shutdownRequested()

setExceptionListener

public void setExceptionListener(ExceptionListener listener)
Sets an ExceptionListener that will be notified when there is an exception due to an inability to an I/O or communications failure.


getExceptionListener

public ExceptionListener getExceptionListener()
Return the ExceptionListener that will be notified when there is an exception due to an I/O or communications failure.


(c) 2000 - 2003 MQue Systems
All Rights Reserved