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 int
STATUS_DONE
static int
STATUS_EXCEPTION
static int
STATUS_NOT_COMPLETED
static int
STATUS_NOT_STARTED
static long
THREAD_SLEEP_INTERVAL
-
Constructor Summary
Constructors Constructor Description IPCBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Identifiable
clone()
This should never be cloned in practice.void
fireEventHappened(IPCEvent ipcEvent)
long
getSleepInterval()
int
getStatus()
Throwable
getThrowable()
boolean
isStopThread()
void
run()
Runs this thread.void
setSleepInterval(long sleepInterval)
void
setStatus(int status)
void
setStopThread(boolean stopThread)
Sets this thread to stop the next time it wakes up.void
setThrowable(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:
fireEventHappened
in interfaceIPCEventListener
-
setStatus
public void setStatus(int status)
-
getStatus
public int getStatus()
-
clone
public Identifiable clone()
This should never be cloned in practice.- Specified by:
clone
in interfaceIdentifiable
- Overrides:
clone
in classObject
- Returns:
-
-