Package org.red5.server.service
Class PendingCall
java.lang.Object
org.red5.server.service.Call
org.red5.server.service.PendingCall
- All Implemented Interfaces:
Externalizable
,Serializable
,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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate HashSet<IPendingServiceCallback>
List of callbacks (event listeners)private Object
Result objectprivate static final long
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
ConstructorDescriptionPendingCall
(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
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
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
result
Result object -
callbacks
List of callbacks (event listeners)
-
-
Constructor Details
-
PendingCall
public 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:
- Remote call result
-
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:
- Set of pending operations callbacks
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classCall
- Throws:
IOException
ClassNotFoundException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classCall
- Throws:
IOException
-