Java Code Examples for org.red5.server.api.scope.IScope#lookupConnection()
The following examples show how to use
org.red5.server.api.scope.IScope#lookupConnection() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServiceUtils.java From red5-server-common with Apache License 2.0 | 6 votes |
/** * Invoke a method on all connections of a client to a given scope and handle result. * * @param client * client to get connections for * @param scope * scope to get connections of the client from * @param method * name of the method to invoke * @param params * parameters to pass to the method * @param callback * object to notify when result is received * @deprecated Use {@link ServiceUtils#invokeOnAllScopeConnections(IScope, String, Object[], IPendingServiceCallback)} instead */ @Deprecated public static void invokeOnClient(IClient client, IScope scope, String method, Object[] params, IPendingServiceCallback callback) { if (client == null) { invokeOnAllScopeConnections(scope, method, params, callback); } else { IConnection conn = scope.lookupConnection(client); if (conn != null) { if (callback == null) { invokeOnConnection(conn, method, params); } else { invokeOnConnection(conn, method, params, callback); } } } }
Example 2
Source File: ServiceUtils.java From red5-server-common with Apache License 2.0 | 3 votes |
/** * Notify a method on all connections of a client to a given scope. * * @param client * client to get connections for * @param scope * scope to get connections of the client from * @param method * name of the method to notify * @param params * parameters to pass to the method * @deprecated Use {@link ServiceUtils#notifyOnAllScopeConnections(IScope, String, Object[])} instead */ @Deprecated public static void notifyOnClient(IClient client, IScope scope, String method, Object[] params) { if (client == null) { notifyOnAllScopeConnections(scope, method, params); } else { IConnection conn = scope.lookupConnection(client); if (conn != null) { notifyOnConnection(conn, method, params); } } }