Package org.red5.server.service
Class ServiceInvoker
java.lang.Object
org.red5.server.service.ServiceInvoker
- All Implemented Interfaces:
IServiceInvoker
Makes remote calls, invoking services, resolves service handlers
- Author:
- The Red5 Project, Luke Hubbard, Codegent Ltd (luke@codegent.com)
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
static final String
Service nameprivate Set<IServiceResolver>
Service resolvers set -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate Object
getServiceHandler
(IScope scope, String serviceName) Lookup a handler for the passed service name in the given scope.boolean
invoke
(IServiceCall call, Object service) Execute the passed service call in the given object.boolean
invoke
(IServiceCall call, IScope scope) Execute the passed service call in the given scope.void
setServiceResolvers
(Set<IServiceResolver> resolvers) Setter for service resolvers.
-
Field Details
-
log
private static final org.slf4j.Logger log -
SERVICE_NAME
Service name- See Also:
-
serviceResolvers
Service resolvers set
-
-
Constructor Details
-
ServiceInvoker
public ServiceInvoker()
-
-
Method Details
-
setServiceResolvers
Setter for service resolvers.- Parameters:
resolvers
- Service resolvers
-
getServiceHandler
Lookup a handler for the passed service name in the given scope.- Parameters:
scope
- ScopeserviceName
- Service name- Returns:
- Service handler
-
invoke
Execute the passed service call in the given scope. This looks up the handler for the call in the scope and the context of the scope.- Specified by:
invoke
in interfaceIServiceInvoker
- Parameters:
call
- the call to invokescope
- the scope to search for a handler- Returns:
true
if the call was performed, otherwisefalse
-
invoke
Execute the passed service call in the given object.- Specified by:
invoke
in interfaceIServiceInvoker
- Parameters:
call
- the call to invokeservice
- the service to use- Returns:
true
if the call was performed, otherwisefalse
-