public class ServiceHandlerComposition extends Object implements ServiceHandler
| Constructor and Description |
|---|
ServiceHandlerComposition()
Constructor for ServiceHandlerComposition.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object o)
Add ServiceHandler or Service handling object.
|
<T> T |
getServiceHandlerByService(Class<? extends ServiceRequest> requestClass)
Returns the service handler that handles given request.
|
ServiceHandler[] |
getServiceHandlers()
getServiceHandlers.
|
void |
getSupportedServices(Collection<Class<? extends IEncodeable>> result)
Get supported services.
|
static ServiceHandler |
of(Object... handlers)
Create service handler composed of a set of service handlers.
|
static void |
readWithReflection(Object serviceHandler,
ServiceHandlerComposition result)
Reads supported service handler methods with reflection.
|
void |
serve(EndpointServiceRequest<?,?> request)
Serve a service request.
|
boolean |
supportsService(Class<? extends IEncodeable> clazz)
Queries whether this handler supports a given request class.
|
public ServiceHandlerComposition()
Constructor for ServiceHandlerComposition.
public static final ServiceHandler of(Object... handlers)
ServiceHandler or implement service request
methods, e.g. methods in SessionServiceSetHandler.handlers - service handlers.public static void readWithReflection(Object serviceHandler, ServiceHandlerComposition result)
serviceHandler - service handlerresult - composition where reflection based handlers are addedpublic void add(Object o)
o - ServiceHandler or Service handling object.public <T> T getServiceHandlerByService(Class<? extends ServiceRequest> requestClass)
T - service handler classrequestClass - request classpublic ServiceHandler[] getServiceHandlers()
getServiceHandlers.
ServiceHandler objects.public void getSupportedServices(Collection<Class<? extends IEncodeable>> result)
getSupportedServices in interface ServiceHandlerresult - to be filled with request classes of supported services.public void serve(EndpointServiceRequest<?,?> request)
The implementation is allowed to may submit the response later and from another thread.
serve in interface ServiceHandlerrequest - the service requestpublic boolean supportsService(Class<? extends IEncodeable> clazz)
supportsService in interface ServiceHandlerclazz - classCopyright © 2026. All rights reserved.