public interface ServiceFactory
MessageHandlerFactory
creation.
An Elko server application provides an implementation of this interface
to the Server
object when it asks it to start listeners based on
information in the server configuration file. Whenever a listener is
started, that ServiceFactory is called to provide an appropriate MessageHandlerFactory
to provide MessageHandler
s for each new
connection accepted by that listener, based on the selection of services
that are configured to be offered over connections made to that listener.
Modifier and Type | Method and Description |
---|---|
MessageHandlerFactory |
provideFactory(String label,
AuthDesc auth,
Set<String> allow,
List<String> serviceNames,
String protocol)
Provide a message handler factory for a new listener.
|
MessageHandlerFactory provideFactory(String label, AuthDesc auth, Set<String> allow, List<String> serviceNames, String protocol)
label
- The label for the listener; typically this is the root
property name for the properties defining the listener attributes.auth
- The authorization configuration for the listener.allow
- A set of permission keywords (derived from the properties
configuring this listener) that specify what sorts of connections
will be permitted through the listener.serviceNames
- A mutable list to which this method should append
(and thus return) the names of the services offered to connections
made to the new listener.protocol
- The protocol (TCP, HTTP, etc.) that connections made
to the new listener are expected to speakMessageHandlerFactory
that will provide message
handlers for connections made to the new listener.Copyright © 2017. All rights reserved.