Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
IConnection |
bind(String stormId,
int port,
IConnectionCallback cb,
Supplier<Object> newConnectionResponse)
This method establishes a server side connection.
|
IConnection |
connect(String stormId,
String host,
int port,
AtomicBoolean[] remoteBpStatus)
This method establish a client side connection to a remote server implementation should return a new connection every call.
|
void |
prepare(Map<String,Object> topoConf)
This method is invoked at the startup of messaging plugin.
|
void |
term()
This method is invoked when a worker is unloading a messaging plugin.
|
public void prepare(Map<String,Object> topoConf)
IContext
This method is invoked at the startup of messaging plugin.
public IConnection bind(String stormId, int port, IConnectionCallback cb, Supplier<Object> newConnectionResponse)
IContext
This method establishes a server side connection.
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)
IContext
This method establish a client side connection to a remote server implementation should return a new connection every call.
Copyright © 2022 The Apache Software Foundation. All rights reserved.