Package org.red5.server.service
Class PendingCall
java.lang.Object
org.red5.server.service.Call
org.red5.server.service.PendingCall
- All Implemented Interfaces:
IExternalizable
,IPendingServiceCall
,IServiceCall
Pending call is remote call operation that is in pending state. Remote calls to services are asynchronous, that is, after call but before result callback remote calls are in pending state.
- Author:
- mondain
-
Field Summary
Fields inherited from class org.red5.server.service.Call
arguments, exception, serviceMethodName, serviceName, status, STATUS_ACCESS_DENIED, STATUS_APP_SHUTTING_DOWN, STATUS_GENERAL_EXCEPTION, STATUS_INVOCATION_EXCEPTION, STATUS_METHOD_NOT_FOUND, STATUS_NOT_CONNECTED, STATUS_PENDING, STATUS_SERVICE_NOT_FOUND, STATUS_SUCCESS_NULL, STATUS_SUCCESS_RESULT, STATUS_SUCCESS_VOID
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for PendingCall.PendingCall
(String method) Creates pending call with given method namePendingCall
(String method, Object[] args) Creates pending call with given method name and array of parametersPendingCall
(String name, String method, Object[] args) Creates pending call with given method name, service name and array of parameters -
Method Summary
Modifier and TypeMethodDescriptionReturns list of callback objects, usually callback object represented as an anonymous class instance that implements IPendingServiceCallback interface.Returns service call resultvoid
Load custom object from stream.void
registerCallback
(IPendingServiceCallback callback) Registers callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.void
Setter for property 'result'.void
unregisterCallback
(IPendingServiceCallback callback) Unregisters callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.void
writeExternal
(IDataOutput out) Store custom object to stream.Methods inherited from class org.red5.server.service.Call
getArguments, getException, getReadTime, getServiceMethodName, getServiceName, getStatus, getWriteTime, isSuccess, setArguments, setException, setServiceMethodName, setServiceName, setStatus, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.red5.server.api.service.IServiceCall
getArguments, getException, getReadTime, getServiceMethodName, getServiceName, getStatus, getWriteTime, isSuccess, setException, setStatus
-
Constructor Details
-
PendingCall
public PendingCall()Constructor for PendingCall.
-
PendingCall
Creates pending call with given method name- Parameters:
method
- Method name
-
PendingCall
Creates pending call with given method name and array of parameters- Parameters:
method
- Method nameargs
- Parameters
-
PendingCall
Creates pending call with given method name, service name and array of parameters- Parameters:
name
- Service namemethod
- Method nameargs
- Parameters
-
-
Method Details
-
getResult
Returns service call result- Specified by:
getResult
in interfaceIPendingServiceCall
- Returns:
- a
Object
object
-
setResult
Setter for property 'result'.- Specified by:
setResult
in interfaceIPendingServiceCall
- Parameters:
result
- Value to set for property 'result'.
-
registerCallback
Registers callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.- Specified by:
registerCallback
in interfaceIPendingServiceCall
- Parameters:
callback
- Callback object
-
unregisterCallback
Unregisters callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.- Specified by:
unregisterCallback
in interfaceIPendingServiceCall
- Parameters:
callback
- Callback object
-
getCallbacks
Returns list of callback objects, usually callback object represented as an anonymous class instance that implements IPendingServiceCallback interface.- Specified by:
getCallbacks
in interfaceIPendingServiceCall
- Returns:
- a
Set
object
-
readExternal
Load custom object from stream.- Specified by:
readExternal
in interfaceIExternalizable
- Overrides:
readExternal
in classCall
- Parameters:
in
- object to be used for data loading
-
writeExternal
Store custom object to stream.- Specified by:
writeExternal
in interfaceIExternalizable
- Overrides:
writeExternal
in classCall
- Parameters:
out
- object to be used for data storing
-