public class Server extends Object
Constructor and Description |
---|
Server() |
Modifier and Type | Method and Description |
---|---|
boolean |
addInterceptHandler(InterceptHandler interceptHandler)
SPI method used by Broker embedded applications to add intercept handlers.
|
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance() |
List<Subscription> |
getSubscriptions()
SPI method used by Broker embedded applications to get list of subscribers.
|
void |
internalPublish(PublishMessage msg)
Use the broker to publish a message.
|
static void |
main(String[] args) |
boolean |
removeInterceptHandler(InterceptHandler interceptHandler)
SPI method used by Broker embedded applications to remove intercept handlers.
|
void |
startServer()
Starts Moquette bringing the configuration from the file
located at m_config/moquette.conf
|
void |
startServer(File configFile)
Starts Moquette bringing the configuration from the given file
|
void |
startServer(IConfig config)
Starts Moquette bringing the configuration files from the given Config implementation.
|
void |
startServer(IConfig config,
List<? extends InterceptHandler> handlers)
Starts Moquette with config provided by an implementation of IConfig class and with the
set of InterceptHandler.
|
void |
startServer(IConfig config,
List<? extends InterceptHandler> handlers,
ISslContextCreator sslCtxCreator,
IAuthenticator authenticator,
IAuthorizator authorizator) |
void |
startServer(Properties configProps)
Starts the server with the given properties.
|
void |
stopServer() |
public static void main(String[] args) throws IOException
IOException
public void startServer() throws IOException
IOException
- in case of any IO error.public void startServer(File configFile) throws IOException
configFile
- text file that contains the configuration.IOException
- in case of any IO Error.public void startServer(Properties configProps) throws IOException
configProps
- the properties map to use as configuration.IOException
- in case of any IO Error.public void startServer(IConfig config) throws IOException
config
- the configuration to use to start the broker.IOException
- in case of any IO Error.public void startServer(IConfig config, List<? extends InterceptHandler> handlers) throws IOException
config
- the configuration to use to start the broker.handlers
- the handlers to install in the broker.IOException
- in case of any IO Error.public void startServer(IConfig config, List<? extends InterceptHandler> handlers, ISslContextCreator sslCtxCreator, IAuthenticator authenticator, IAuthorizator authorizator) throws IOException
IOException
public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
public void internalPublish(PublishMessage msg)
msg
- the message to forward.IllegalStateException
- if the server is not yet startedpublic void stopServer()
public List<Subscription> getSubscriptions()
public boolean addInterceptHandler(InterceptHandler interceptHandler)
interceptHandler
- the handler to add.public boolean removeInterceptHandler(InterceptHandler interceptHandler)
interceptHandler
- the handler to remove.Copyright © 2011–2017. All rights reserved.