Package org.apache.storm.messaging.netty
Class Context
java.lang.Object
org.apache.storm.messaging.netty.Context
- All Implemented Interfaces:
- IContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbind(String stormId, int port, IConnectionCallback cb, Supplier<Object> newConnectionResponse) establish a server with a binding port.connect(String stormId, String host, int port, AtomicBoolean[] remoteBpStatus) establish a connection to a remote server.voidinitialization per Storm configuration.voidprepare(Map<String, Object> topoConf, StormMetricRegistry metricRegistry) This method is invoked at the startup of messaging plugin.voidterm()terminate this context.
- 
Constructor Details- 
Contextpublic Context()
 
- 
- 
Method Details- 
prepareinitialization per Storm configuration.
- 
prepareDescription copied from interface:IContextThis method is invoked at the startup of messaging plugin.
- 
bindpublic IConnection bind(String stormId, int port, IConnectionCallback cb, Supplier<Object> newConnectionResponse) establish a server with a binding port.- Specified by:
- bindin interface- IContext
- Parameters:
- stormId- topology ID
- port- port #
- cb- The callback to deliver received messages to
- newConnectionResponse- Supplier of the initial message to send to new client connections. If authentication is required, the message will be sent after authentication is complete.
- Returns:
- server side connection
 
- 
connectestablish a connection to a remote server.
- 
termpublic void term()terminate this context.
 
-