|
Avaya Conferencing Provider API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.avaya.conferencing.api.acp.control.operations.AbstractOperationImpl<RESULT,IMPL>
RESULT - The result type returned by this Operation's get methodIMPL - The operation type that is extending AbstractOperationImpl.public abstract class AbstractOperationImpl<RESULT,IMPL extends Operation<RESULT,IMPL>>
Abstract base class for all Operation implementations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.avaya.conferencing.api.acp.control.operations.Operation |
|---|
Operation.Impact |
| Constructor Summary | |
|---|---|
AbstractOperationImpl()
|
|
| Method Summary | |
|---|---|
void |
await()
Blocks until the operation is completed. |
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
Causes the current thread to wait until the operation is completed, unless the thread is interrupted, or the specified waiting time elapses. |
protected void |
checkNotSubmitted()
For use in Operations, throws an IllegalStateException if this operation has been submitted. |
protected void |
checkSubmitted()
For use in Operations, throws an IllegalStateException if this operation has not been submitted. |
IMPL |
clone()
Creates and returns a copy of this operation. |
RESULT |
get()
Waits if necessary for the operation to complete, and then retrieves its result. |
RESULT |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Waits if necessary for at most the given time for the operation to complete, and then retrieves its result, if available. |
boolean |
isDone()
Returns true if this operation completed. |
boolean |
isSubmitted()
Returns true if this operation has been submitted for execution. |
void |
set(java.util.concurrent.Future<RESULT> vFuture)
This method is called by the ConferencingObject when the operation is accepted for execution. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.avaya.conferencing.api.acp.control.operations.Operation |
|---|
getImpact, getVerb |
| Constructor Detail |
|---|
public AbstractOperationImpl()
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isSubmitted()
true if this operation has been submitted for execution.
isSubmitted in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>true if this operation has been submitted for execution.public boolean isDone()
true if this operation completed. Completion may be due to normal termination, an
exception, or cancellation - in all of these cases, this method will return true.
isDone in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>true if this operation completed.
public RESULT get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
get in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>java.lang.InterruptedException - If the current thread was interrupted while waiting.
java.util.concurrent.ExecutionException - If the computation threw an exception.
public void await()
throws java.lang.InterruptedException
await in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>java.lang.InterruptedException - if interrupted.
public boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
If the operation is completed then this method returns immediately.
If the operation has yet to complete then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:
If the operation completes then the method returns with the value true.
If the current thread:
If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.
await in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>timeout - The maximum time to wait.unit - The time unit of the timeout argument.
true If the operation completed and false if the waiting time elapsed before the
operation completed.
java.lang.InterruptedException - if the current thread is interrupted while waiting.
public RESULT get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
get in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>timeout - The maximum time to wait.unit - The time unit of the timeout argument.
java.lang.InterruptedException - If the current thread was interrupted while waiting.
java.util.concurrent.ExecutionException - If the computation threw an exception.
java.util.concurrent.TimeoutException - If the wait timed out.public void set(java.util.concurrent.Future<RESULT> vFuture)
set in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>vFuture - The future for completion of the operation.protected final void checkNotSubmitted()
java.lang.IllegalStateException - if this operation has been submitted.protected final void checkSubmitted()
java.lang.IllegalStateException - if this operation has not been submitted.public final IMPL clone()
clone in interface Operation<RESULT,IMPL extends Operation<RESULT,IMPL>>clone in class java.lang.ObjectCloneable
|
Avaya Conferencing Provider API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||