Package edu.uiuc.ncsa.security.core.ipc
Class IPCBean
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.ipc.IPCBean
-
- All Implemented Interfaces:
Identifiable,IPCEventListener,Serializable,Cloneable,Runnable,EventListener
public abstract class IPCBean extends Object implements Runnable, IPCEventListener
A bean for Inter-Process Communication. This lets the various threads and servlets track information so that exceptions can be propagated between them, This tracks pending transactions that are initiated by the authorized servlet. This waits for a transaction to be completed or to intercept any errors that might occur during execution.Created by Jeff Gaynor
on 8/18/11 at 6:47 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATUS_DONEstatic intSTATUS_EXCEPTIONstatic intSTATUS_NOT_COMPLETEDstatic intSTATUS_NOT_STARTEDstatic longTHREAD_SLEEP_INTERVAL
-
Constructor Summary
Constructors Constructor Description IPCBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Identifiableclone()This should never be cloned in practice.voidfireEventHappened(IPCEvent ipcEvent)longgetSleepInterval()intgetStatus()ThrowablegetThrowable()booleanisStopThread()voidrun()Runs this thread.voidsetSleepInterval(long sleepInterval)voidsetStatus(int status)voidsetStopThread(boolean stopThread)Sets this thread to stop the next time it wakes up.voidsetThrowable(Throwable throwable)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.uiuc.ncsa.security.core.Identifiable
getDescription, getIdentifier, getIdentifierString, isReadOnly, setDescription, setIdentifier, setReadOnly
-
-
-
-
Field Detail
-
STATUS_NOT_STARTED
public static final int STATUS_NOT_STARTED
- See Also:
- Constant Field Values
-
STATUS_DONE
public static final int STATUS_DONE
- See Also:
- Constant Field Values
-
STATUS_EXCEPTION
public static final int STATUS_EXCEPTION
- See Also:
- Constant Field Values
-
STATUS_NOT_COMPLETED
public static final int STATUS_NOT_COMPLETED
- See Also:
- Constant Field Values
-
THREAD_SLEEP_INTERVAL
public static final long THREAD_SLEEP_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
isStopThread
public boolean isStopThread()
-
setStopThread
public void setStopThread(boolean stopThread)
Sets this thread to stop the next time it wakes up.- Parameters:
stopThread-
-
getSleepInterval
public long getSleepInterval()
-
setSleepInterval
public void setSleepInterval(long sleepInterval)
-
run
public void run()
Runs this thread. The bean stores the state and listens for events.
-
getThrowable
public Throwable getThrowable()
-
setThrowable
public void setThrowable(Throwable throwable)
-
fireEventHappened
public void fireEventHappened(IPCEvent ipcEvent)
- Specified by:
fireEventHappenedin interfaceIPCEventListener
-
setStatus
public void setStatus(int status)
-
getStatus
public int getStatus()
-
clone
public Identifiable clone()
This should never be cloned in practice.- Specified by:
clonein interfaceIdentifiable- Overrides:
clonein classObject- Returns:
-
-