public class Introspector extends Object
| Modifier and Type | Field and Description |
|---|---|
static Introspector |
DEFAULT_INTROSPECTOR
Default introspector instance.
|
| Constructor and Description |
|---|
Introspector() |
| Modifier and Type | Method and Description |
|---|---|
<ContextType extends ContextInterface> |
createDispatcher(Class<ContextType> type)
Creates dispatcher for given facade type.
|
<ContextType extends ContextInterface> |
register(Class<? super ContextType> facade,
Dispatcher<? extends ContextType> dispatcher)
Registers request handlers for methods of given class in provided dispatcher.
|
<Type> void |
registerParameterProvider(Class<Type> type,
ParameterProvider<? extends Type> resolver)
Registers parameter resolver for given class.
|
<Type> void |
registerResultMapper(Class<Type> type,
Function<? super Type,Object> mapper)
Registers return type handler for given class.
|
public static final Introspector DEFAULT_INTROSPECTOR
public <Type> void registerParameterProvider(Class<Type> type, ParameterProvider<? extends Type> resolver)
Type - Parameter type.type - Parameter type.resolver - Parameter resolver.public <Type> void registerResultMapper(Class<Type> type, Function<? super Type,Object> mapper)
Type - Response object type.type - Response type.mapper - Response mapper.public <ContextType extends ContextInterface> void register(Class<? super ContextType> facade, Dispatcher<? extends ContextType> dispatcher)
ContextType - Service request context type (will be used for execution context).facade - Request handling facade.dispatcher - Methods dispatcher.IllegalArgumentException - When a method of the facade can't be mapped to JSON-RPC call.public <ContextType extends ContextInterface> Dispatcher<ContextType> createDispatcher(Class<ContextType> type)
Created dispatcher contains additional version method handler.
ContextType - Service request context type (will be used for execution context).type - Class to be used as a facade.Copyright © 2015 RafaĆ Wrzeszcz - Wrzasq.pl. All rights reserved.