Package org.red5.server.net.rtmp
Class DeferredResult
java.lang.Object
org.red5.server.net.rtmp.DeferredResult
Can be returned to delay returning the result of invoked methods.
- Author:
- The Red5 Project, Joachim Bauch (jojo@struktur.de)
-
Field Summary
Modifier and TypeFieldDescriptionprivate IPendingServiceCall
Pending call objectprivate WeakReference<Channel>
Weak reference to used channelprotected static org.slf4j.Logger
Loggerprivate boolean
Results sent flagprivate int
Transaction id -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setChannel
(Channel channel) Setter for channel.void
Set the result of a method call and send to the caller.void
Setter for service call.void
setTransactionId
(int id) Setter for transaction id.boolean
wasSent()
Check if the result has been sent to the client.
-
Field Details
-
log
protected static org.slf4j.Logger logLogger -
channel
Weak reference to used channel -
call
Pending call object -
transactionId
private int transactionIdTransaction id -
resultSent
private boolean resultSentResults sent flag
-
-
Constructor Details
-
DeferredResult
public DeferredResult()
-
-
Method Details
-
setResult
Set the result of a method call and send to the caller.- Parameters:
result
- deferred result of the method call
-
wasSent
public boolean wasSent()Check if the result has been sent to the client.- Returns:
true
if the result has been sent, otherwisefalse
-
setTransactionId
public void setTransactionId(int id) Setter for transaction id.- Parameters:
id
- Invocation object identifier
-
setServiceCall
Setter for service call.- Parameters:
call
- Service call
-
setChannel
Setter for channel.- Parameters:
channel
- Channel
-