public class ServiceAnnouncingChatHandlerProvider extends Object implements ChatHandlerProvider
get(String) method
allows anyone with a reference to this object to obtain a particular ChatHandler. An embedded
ServiceAnnouncer will be used to advertise handlers on this host.| Constructor and Description |
|---|
ServiceAnnouncingChatHandlerProvider(DruidNode node,
ServiceAnnouncer serviceAnnouncer) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<ChatHandler> |
get(String key)
Retrieves a chat handler.
|
void |
register(String service,
ChatHandler handler)
Registers a chat handler which provides an API for others to talk to objects in the indexing service.
|
void |
register(String service,
ChatHandler handler,
boolean announce)
Registers a chat handler which provides an API for others to talk to objects in the indexing service.
|
void |
unregister(String service)
Unregisters a chat handler.
|
@Inject public ServiceAnnouncingChatHandlerProvider(DruidNode node, ServiceAnnouncer serviceAnnouncer)
public void register(String service, ChatHandler handler)
ChatHandlerProviderregister in interface ChatHandlerProviderservice - a unique name identifying this servicehandler - instance which implements the API to be exposedpublic void register(String service, ChatHandler handler, boolean announce)
ChatHandlerProviderregister in interface ChatHandlerProviderservice - a unique name identifying this servicehandler - instance which implements the API to be exposedannounce - for implementations that have a service discovery mechanism, whether this node should be announcedpublic void unregister(String service)
ChatHandlerProviderunregister in interface ChatHandlerProviderservice - the name of the servicepublic com.google.common.base.Optional<ChatHandler> get(String key)
ChatHandlerProviderget in interface ChatHandlerProviderkey - the name of the serviceCopyright © 2011–2017. All rights reserved.