Package org.somda.sdc.dpws.device
Class WebService
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service,org.somda.sdc.dpws.soap.interception.Interceptor
public abstract class WebService extends AbstractIdleService implements Interceptor
Web Service base class.
The Web Service is a server interceptor to process incoming requests of a certain Web Service. Moreover, the Web Service base class is capable of providing an event source to send notifications if needed.
The event source is only set if a hosted service has been registered at the Web Service. The hosted service can be registered by first getting the hosting service access followed by adding a hosted service:
- getHostingServiceAccess to get hosting service access, and then
- addHostedService to add the service to a hosting service.
-
-
Method Summary
Modifier and Type Method Description voidregisterEventSource(EventSourceDialectHandler eventSource)Allows to register an event source from outside. Collection<EventSourceDialectHandler>getEventSources()Gets the event sources of this Web Service. -
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
registerEventSource
void registerEventSource(EventSourceDialectHandler eventSource)
Allows to register an event source from outside.
This method is not thread-safe and should only be invoked initially by the user prior to start up.
- Parameters:
eventSource- the event source to inject or null to reset.
-
getEventSources
Collection<EventSourceDialectHandler> getEventSources()
Gets the event sources of this Web Service.
- Returns:
the event sources.
-
-
-
-