|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the referenced valuepublic interface Reference<T>
Models an EndPointReference, that is, a reference to a remote process.
This reference must be filled in during workflow enaction.
Method Summary | |
---|---|
void |
addReader(Process reader)
Adds a process to the readers list. |
void |
addWriter(Process writer)
Adds a process to the writers list. |
boolean |
canCastFrom(java.lang.Class<?> type)
Gets if the value can be converted from the specified type. |
boolean |
canCastTo(java.lang.Class<?> type)
Gets if the value can be casted to the specified type. |
java.lang.Object |
castTo(java.lang.Class<?> type)
Gets the value after casting it to the specified type. |
void |
clearLinks()
Clears the reader and writer lists. |
Reference<T> |
copy()
makes a deep copy of this instance. |
void |
dispose()
Depending on the reference nature, it may be necessary to free resources, or perform some kind of finalisation. |
java.util.Set<Process> |
getReaders()
Gets the reader processes attached to this reference. |
T |
getValue()
Gets the referenced value. |
java.lang.Class<T> |
getValueType()
Gets a class instance representing the type of referenced values. |
java.util.Set<Process> |
getWriters()
Gets the writer processes attached to this reference. |
boolean |
isAvailable()
Gets if the reference is available for reading. |
java.util.concurrent.locks.Lock |
readLock()
Gets a lock for reading. |
void |
removeReader(Process reader)
Removes a process from the readers list. |
void |
removeWriter(Process writer)
Removes a process from the writers list. |
void |
reset()
Clears the value and marks the reference as not available. |
void |
setAvailable(boolean available)
Sets the available flag. |
void |
setValue(java.lang.Object value)
Sets the referenced value. |
void |
waitAvailable()
Waits until the reference is made available in another thread. |
java.util.concurrent.locks.Lock |
writeLock()
Gets a lock for writing. |
Method Detail |
---|
void dispose()
Reference<T> copy()
void clearLinks()
void reset()
void addReader(Process reader)
reader
- The process to addvoid addWriter(Process writer)
writer
- The process to addvoid removeReader(Process reader)
reader
- The process to removevoid removeWriter(Process writer)
writer
- The process to removejava.util.Set<Process> getWriters()
java.util.Set<Process> getReaders()
T getValue()
void setValue(java.lang.Object value)
value
- The valuejava.lang.Object castTo(java.lang.Class<?> type)
type
- The target type
java.lang.ClassCastException
- If the value cannot be correctly castedjava.lang.Class<T> getValueType()
boolean canCastTo(java.lang.Class<?> type)
This method is used by processes to validate input references.
type
- The type to cast to
boolean canCastFrom(java.lang.Class<?> type)
This method is used by processes to validate output references.
type
- The type to cast from
boolean isAvailable()
void setAvailable(boolean available)
available
- The new flag valuejava.util.concurrent.locks.Lock readLock()
java.util.concurrent.locks.Lock writeLock()
void waitAvailable() throws java.lang.InterruptedException
java.lang.InterruptedException
- If the thread is interrupted while waiting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |