osmq.util
Class AbstractThreadable
java.lang.Object
osmq.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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractThreadable
public AbstractThreadable()
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.