public class DefaultHandlerRegistry extends Object implements HandlerRegistry
| Constructor and Description |
|---|
DefaultHandlerRegistry(com.google.inject.Injector injector,
BeanJsonConverter beanJsonConverter,
HandlerExecutionListener executionListener)
Creates a dispatcher with the specified handler classes
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlers(Set<Object> handlers)
Add handlers to the registry
|
RestHandler |
getRestHandler(String path,
String method)
Get a REST request handler
|
RpcHandler |
getRpcHandler(org.json.JSONObject rpc)
Get an RPC handler
|
Set<String> |
getSupportedRestServices() |
Set<String> |
getSupportedRpcServices() |
@Inject
public DefaultHandlerRegistry(com.google.inject.Injector injector,
BeanJsonConverter beanJsonConverter,
HandlerExecutionListener executionListener)
injector - Used to create instance if handler is a Classpublic void addHandlers(Set<Object> handlers)
addHandlers in interface HandlerRegistryhandlers - public RpcHandler getRpcHandler(org.json.JSONObject rpc)
getRpcHandler in interface HandlerRegistryrpc - The rpc to dispatchpublic RestHandler getRestHandler(String path, String method)
getRestHandler in interface HandlerRegistrypath - Path of the servicemethod - The HTTP methodpublic Set<String> getSupportedRestServices()
getSupportedRestServices in interface HandlerRegistrypublic Set<String> getSupportedRpcServices()
getSupportedRpcServices in interface HandlerRegistryCopyright © 2007-2012. All Rights Reserved.