backtype.storm.messaging.netty
Class Context

java.lang.Object
  extended by backtype.storm.messaging.netty.Context
All Implemented Interfaces:
IContext

public class Context
extends Object
implements IContext


Constructor Summary
Context()
           
 
Method Summary
 IConnection bind(String storm_id, int port)
          establish a server with a binding port
 IConnection connect(String storm_id, String host, int port)
          establish a connection to a remote server
 void prepare(Map storm_conf)
          initialization per Storm configuration
 void term()
          terminate this context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Method Detail

prepare

public void prepare(Map storm_conf)
initialization per Storm configuration

Specified by:
prepare in interface IContext
Parameters:
storm_conf - storm configuration

bind

public IConnection bind(String storm_id,
                        int port)
establish a server with a binding port

Specified by:
bind in interface IContext
Parameters:
storm_id - topology ID
port - port #
Returns:
server side connection

connect

public IConnection connect(String storm_id,
                           String host,
                           int port)
establish a connection to a remote server

Specified by:
connect in interface IContext
Parameters:
storm_id - topology ID
host - remote host
port - remote port
Returns:
client side connection

term

public void term()
terminate this context

Specified by:
term in interface IContext


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.