Package org.red5.server.api.service
Class ServiceUtils
java.lang.Object
org.red5.server.api.service.ServiceUtils
Utility functions to invoke methods on connections.
- Author:
- The Red5 Project, Joachim Bauch ([email protected]), Paul Gregoire ([email protected])
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinvokeOnAllConnections(String method, Object[] params) Invoke a method on all connections to the current scope.static voidinvokeOnAllConnections(String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections to the current scope and handle result.static voidinvokeOnAllConnections(IScope scope, String method, Object[] params) Deprecated.static voidinvokeOnAllConnections(IScope scope, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections to a given scope and handle result.static voidinvokeOnAllScopeConnections(IScope scope, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections of a scope and handle result.static voidinvokeOnClient(IClient client, IScope scope, String method, Object[] params) Invoke a method on all connections of a client to a given scope.static voidinvokeOnClient(IClient client, IScope scope, String method, Object[] params, IPendingServiceCallback callback) Deprecated.static booleaninvokeOnConnection(String method, Object[] params) Invoke a method on the current connection.static booleaninvokeOnConnection(String method, Object[] params, IPendingServiceCallback callback) Invoke a method on the current connection and handle result.static booleaninvokeOnConnection(IConnection conn, String method, Object[] params) Invoke a method on a given connection.static booleaninvokeOnConnection(IConnection conn, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on a given connection and handle result.static voidnotifyOnAllConnections(String method, Object[] params) Notify a method on all connections to the current scope.static voidnotifyOnAllConnections(IScope scope, String method, Object[] params) Deprecated.static voidnotifyOnAllScopeConnections(IScope scope, String method, Object[] params) Notify a method on all connections of a scope.static voidnotifyOnClient(IClient client, IScope scope, String method, Object[] params) Deprecated.static booleannotifyOnConnection(String method, Object[] params) Notify a method on the current connection.static booleannotifyOnConnection(IConnection conn, String method, Object[] params) Notify a method on a given connection.
-
Field Details
-
log
private static final org.slf4j.Logger log
-
-
Constructor Details
-
ServiceUtils
public ServiceUtils()
-
-
Method Details
-
invokeOnConnection
Invoke a method on the current connection.- Parameters:
method- name of the method to invokeparams- parameters to pass to the method- Returns:
true
if the connection supports method calls, otherwisefalse
-
invokeOnConnection
public static boolean invokeOnConnection(String method, Object[] params, IPendingServiceCallback callback) Invoke a method on the current connection and handle result.- Parameters:
method- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received- Returns:
true
if the connection supports method calls, otherwisefalse
-
invokeOnConnection
Invoke a method on a given connection.- Parameters:
conn- connection to invoke method onmethod- name of the method to invokeparams- parameters to pass to the method- Returns:
true
if the connection supports method calls, otherwisefalse
-
invokeOnConnection
public static boolean invokeOnConnection(IConnection conn, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on a given connection and handle result.- Parameters:
conn- connection to invoke method onmethod- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received- Returns:
true
if the connection supports method calls, otherwisefalse
-
invokeOnAllConnections
Invoke a method on all connections to the current scope.- Parameters:
method- name of the method to invokeparams- parameters to pass to the method
-
invokeOnAllConnections
public static void invokeOnAllConnections(String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections to the current scope and handle result.- Parameters:
method- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received
-
invokeOnAllConnections
Deprecated.Invoke a method on all connections to a given scope.- Parameters:
scope- scope to get connections formethod- name of the method to invokeparams- parameters to pass to the method
-
invokeOnAllConnections
public static void invokeOnAllConnections(IScope scope, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections to a given scope and handle result.- Parameters:
scope- scope to get connections formethod- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received
-
invokeOnAllScopeConnections
public static void invokeOnAllScopeConnections(IScope scope, String method, Object[] params, IPendingServiceCallback callback) Invoke a method on all connections of a scope and handle result.- Parameters:
scope- scope to get connections frommethod- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received
-
invokeOnClient
Invoke a method on all connections of a client to a given scope.- Parameters:
client- client to get connections forscope- scope to get connections of the client frommethod- name of the method to invokeparams- parameters to pass to the method
-
invokeOnClient
@Deprecated public static void invokeOnClient(IClient client, IScope scope, String method, Object[] params, IPendingServiceCallback callback) Deprecated.Invoke a method on all connections of a client to a given scope and handle result.- Parameters:
client- client to get connections forscope- scope to get connections of the client frommethod- name of the method to invokeparams- parameters to pass to the methodcallback- object to notify when result is received
-
notifyOnConnection
Notify a method on the current connection.- Parameters:
method- name of the method to notifyparams- parameters to pass to the method- Returns:
true
if the connection supports method calls, otherwisefalse
-
notifyOnConnection
Notify a method on a given connection.- Parameters:
conn- connection to notify method onmethod- name of the method to notifyparams- parameters to pass to the method- Returns:
true
if the connection supports method calls, otherwisefalse
-
notifyOnAllConnections
Notify a method on all connections to the current scope.- Parameters:
method- name of the method to notifyparams- parameters to pass to the method
-
notifyOnAllConnections
Deprecated.Notify a method on all connections to a given scope.- Parameters:
scope- scope to get connections formethod- name of the method to notifyparams- parameters to pass to the method
-
notifyOnAllScopeConnections
Notify a method on all connections of a scope.- Parameters:
scope- scope to dispatch eventmethod- name of the method to notifyparams- parameters to pass to the method
-
notifyOnClient
@Deprecated public static void notifyOnClient(IClient client, IScope scope, String method, Object[] params) Deprecated.Notify a method on all connections of a client to a given scope.- Parameters:
client- client to get connections forscope- scope to get connections of the client frommethod- name of the method to notifyparams- parameters to pass to the method
-
invokeOnAllScopeConnections(IScope, String, Object[], IPendingServiceCallback)instead