bamboo.www
Class WebInterface
java.lang.Object
bamboo.util.StandardStage
bamboo.www.WebInterface
- All Implemented Interfaces:
- StorageManager.StorageMonitor, EventHandlerIF, SingleThreadedEventHandlerIF
public class WebInterface
- extends StandardStage
- implements SingleThreadedEventHandlerIF, StorageManager.StorageMonitor
A web interface to the router's state.
- Version:
- $Id: WebInterface.java,v 1.26 2005/03/02 02:25:13 srhea Exp $
- Author:
- Sean C. Rhea
| Methods inherited from class bamboo.util.StandardStage |
BUG, BUG, BUG, config_get_boolean, config_get_double, config_get_int, config_get_string, configGetInt, destroy, dispatch, enqueue, handleEvents, lookup_stage, now_ms, timer_ms |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instances
protected static HashMap<ostore.util.NodeId,WebInterface> instances
CR
public static final int CR
- See Also:
- Constant Field Values
LF
public static final int LF
- See Also:
- Constant Field Values
DIGIT_VALUES
protected int DIGIT_VALUES
MODULUS
protected BigInteger MODULUS
my_guid
protected BigInteger my_guid
my_neighbor_info
protected BambooNeighborInfo my_neighbor_info
initialized
protected boolean initialized
wait_q
protected LinkedList wait_q
app_id
protected static final long app_id
init_start_time_ms
protected long init_start_time_ms
preds
protected BambooNeighborInfo[] preds
succs
protected BambooNeighborInfo[] succs
rand
protected Random rand
search_leaf_set_ttl
protected int search_leaf_set_ttl
rt
protected RoutingTable rt
latencies
protected Map latencies
listen_port
protected int listen_port
svr_ch
protected ServerSocketChannel svr_ch
web_appender
protected WebAppender web_appender
hostname
protected String hostname
handlers
protected HashMap<String,Object> handlers
total_storage
protected long total_storage
coordinate
protected VirtualCoordinate coordinate
periodic_timer_cb
protected ASyncCore.TimerCB periodic_timer_cb
WebInterface
public WebInterface()
throws Exception
- Throws:
Exception
instance
public static WebInterface instance(ostore.util.NodeId node_id)
register_xml_rpc_handler
public void register_xml_rpc_handler(String name,
Object handler)
storage_changed
public void storage_changed(boolean added,
InetAddress client_id,
long size)
- Specified by:
storage_changed in interface StorageManager.StorageMonitor
init
public void init(ConfigDataIF config)
throws Exception
- Specified by:
init in interface EventHandlerIF- Overrides:
init in class StandardStage
- Throws:
Exception
handleEvent
public void handleEvent(QueueElementIF item)
- Specified by:
handleEvent in interface EventHandlerIF- Overrides:
handleEvent in class StandardStage
handle_reg_resp
protected void handle_reg_resp(BambooRouterAppRegResp resp)
handle_accept_ready
protected void handle_accept_ready()
handle_read_ready
protected void handle_read_ready(SelectionKey skey,
WebInterface.ConnState state)
close
protected void close(WebInterface.ConnState state)
handle_write_ready
protected void handle_write_ready(SelectionKey skey,
WebInterface.ConnState state)
print_ls_table_row
protected void print_ls_table_row(StringBuffer r,
int pos,
BambooNeighborInfo ni,
Long rtt_ms)
create_response
protected void create_response(WebInterface.ConnState state,
byte[] resp)
create_response
protected void create_response(WebInterface.ConnState state)
handle_ls_changed
protected void handle_ls_changed(BambooLeafSetChanged msg)
handle_rt_changed
protected void handle_rt_changed(BambooRoutingTableChanged msg)