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 resultvoidLoad custom object from stream.voidregisterCallback(IPendingServiceCallback callback) Registers callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.voidSetter for property 'result'.voidunregisterCallback(IPendingServiceCallback callback) Unregisters callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.voidwriteExternal(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getResultin interfaceIPendingServiceCall- Returns:
- a
Objectobject
-
setResult
Setter for property 'result'.- Specified by:
setResultin 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:
registerCallbackin interfaceIPendingServiceCall- Parameters:
callback- Callback object
-
unregisterCallback
Unregisters callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.- Specified by:
unregisterCallbackin 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:
getCallbacksin interfaceIPendingServiceCall- Returns:
- a
Setobject
-
readExternal
Load custom object from stream.- Specified by:
readExternalin interfaceIExternalizable- Overrides:
readExternalin classCall- Parameters:
in- object to be used for data loading
-
writeExternal
Store custom object to stream.- Specified by:
writeExternalin interfaceIExternalizable- Overrides:
writeExternalin classCall- Parameters:
out- object to be used for data storing
-