Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
IConnection |
bind(String stormId,
int port,
IConnectionCallback cb,
Supplier<Object> newConnectionResponse)
establish a server with a binding port.
|
IConnection |
connect(String stormId,
String host,
int port,
AtomicBoolean[] remoteBpStatus)
establish a connection to a remote server.
|
void |
prepare(Map<String,Object> topoConf)
initialization per Storm configuration.
|
void |
prepare(Map<String,Object> topoConf,
StormMetricRegistry metricRegistry)
This method is invoked at the startup of messaging plugin.
|
void |
term()
terminate this context.
|
public void prepare(Map<String,Object> topoConf, StormMetricRegistry metricRegistry)
IContext
This method is invoked at the startup of messaging plugin.
public IConnection bind(String stormId, int port, IConnectionCallback cb, Supplier<Object> newConnectionResponse)
establish a server with a binding port.
bind
in interface IContext
stormId
- topology IDport
- port #cb
- The callback to deliver received messages tonewConnectionResponse
- Supplier of the initial message to send to new client connections. If authentication is required, the message will be sent after authentication is complete.public IConnection connect(String stormId, String host, int port, AtomicBoolean[] remoteBpStatus)
establish a connection to a remote server.
Copyright © 2022 The Apache Software Foundation. All rights reserved.