net.i2p.BOB
Class BOB

java.lang.Object
  extended by net.i2p.BOB.BOB
All Implemented Interfaces:
Runnable, ClientApp

public class BOB
extends Object
implements Runnable, ClientApp

################################################################################
############################.#..........#..#..........##########################
#######################......................................###################
####################...........................#.......#........################
#################..................##...................#.........##############
###############................###...####.....#..###.....#.........#############
#############...........###..#..###...#####...###.##........#.......############
###########................#......##...#####...##..##.......#..#........########
##########.........................#....##.##..#...##.....................######
#########...................................#....#.........................#####
########.........................................#...............#..........####
########.........................................#..........#######..........###
#######.................................................############..........##
#######..........................................####################.........##
#######............####################......########################.........##
######.............###############################################.##.........##
######............################################################..##........##
######............################################################..##........##
######.............##############################################..##.........##
######............##############################################...##..........#
######............#..###########################################...##..........#
######.............#############################################....#..........#
#######...........###############################################..##.........##
#######...........#####.#.#.#.########################.....#.####...##........##
######............#..............##################.................##.........#
######................####.........###############........#####......##........#
######..............####..#.........############.......##.#.######...##.......##
######.................#.####.........########...........##....###...##.......##
#######....#....###...................#######...............#...###..##.......##
#######.........###..###.....###.......######.##.#####.........####..##.......##
#######.....#...##############.........############......###########.###......##
#######....##...##########.......##...##############......#.############.....###
########....#..########......######...##################################....####
########....##.####################...##################################....####
########..#.##..###################..##################################..#..####
##########..###..#################...##################################...#.####
#########....##...##############....########..#####.################.##..#.#####
############.##....##########.......#########.###.......###########..#.#########
###############.....#######...#.......########.....##.....######.....###########
###############......###....##..........##.......######....#.........#.#########
##############............##..................##########..............##########
##############..............................##########..#.............##########
###############.......##..................#####..............####....###########
###############.......#####.......#.............####.....#######.....###########
################...#...####......##################.....########....############
################...##..#####.........####.##.....#....##########....############
##################..##..####...........#####.#....############.....#############
##################......#####.................################....##############
###################.....####..........##########..###########....###############
####################..#..#..........................########.....###############
#####################.##.......###.................########....#################
######################.........#.......#.##.###############....#################
#############.#######...............#####################....###################
###..#.....##...####..........#.....####################....####################
####......##........................##################....######################
#.##...###..............###.........###############......#######################
#...###..##............######...........................########################
##.......###..........##########....#...#...........############################
##.........##.......############################################################
###........##.....##############################################################
####.............###############################################################
######.........#################################################################
#########....###################################################################
################################################################################
BOB, main command socket listener, launches the command parser engine.

Author:
sponge

Field Summary
static String PROP_BOB_HOST
           
static String PROP_BOB_PORT
           
static String PROP_CFG_VER
           
static String PROP_CONFIG_LOCATION
           
 
Constructor Summary
BOB(I2PAppContext context, ClientAppManager mgr, String[] args)
          For ClientApp interface.
 
Method Summary
 String getDisplayName()
          The display name of the ClientApp, used in user interfaces.
 String getName()
          The generic name of the ClientApp, used for registration, e.g.
 ClientAppState getState()
          The current state of the ClientApp.
static void main(String[] args)
          Listen for incoming connections and handle them
 void run()
           
 void shutdown(String[] args)
          Do not take a long time.
 void startup()
          Do not take a long time.
static void stop()
          Deprecated. unused
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CONFIG_LOCATION

public static final String PROP_CONFIG_LOCATION
See Also:
Constant Field Values

PROP_BOB_PORT

public static final String PROP_BOB_PORT
See Also:
Constant Field Values

PROP_BOB_HOST

public static final String PROP_BOB_HOST
See Also:
Constant Field Values

PROP_CFG_VER

public static final String PROP_CFG_VER
See Also:
Constant Field Values
Constructor Detail

BOB

public BOB(I2PAppContext context,
           ClientAppManager mgr,
           String[] args)
For ClientApp interface. Does NOT open the listener socket or start threads; caller must call startup()

Parameters:
mgr - may be null
args - non-null
Throws:
Exception - on bad args
Since:
0.9.10
Method Detail

stop

public static void stop()
Deprecated. unused

Stop BOB gracefully


main

public static void main(String[] args)
Listen for incoming connections and handle them

Parameters:
args -

run

public void run()
Specified by:
run in interface Runnable
Since:
0.9.10

startup

public void startup()
             throws IOException
Description copied from interface: ClientApp
Do not take a long time. Do not block. Start threads here if necessary. Client must call ClientAppManager.notify() at least once within this method to change the state from INITIALIZED to something else. Will not be called multiple times on the same object.

Specified by:
startup in interface ClientApp
Throws:
IOException
Since:
0.9.10

shutdown

public void shutdown(String[] args)
Description copied from interface: ClientApp
Do not take a long time. Do not block. Use a thread if necessary. If previously running, client must call ClientAppManager.notify() at least once within this method to change the state to STOPPING or STOPPED. May be called multiple times on the same object, in any state.

Specified by:
shutdown in interface ClientApp
Parameters:
args - generally null but could be stopArgs from clients.config
Since:
0.9.10

getState

public ClientAppState getState()
Description copied from interface: ClientApp
The current state of the ClientApp.

Specified by:
getState in interface ClientApp
Returns:
non-null
Since:
0.9.10

getName

public String getName()
Description copied from interface: ClientApp
The generic name of the ClientApp, used for registration, e.g. "console". Do not translate.

Specified by:
getName in interface ClientApp
Returns:
non-null
Since:
0.9.10

getDisplayName

public String getDisplayName()
Description copied from interface: ClientApp
The display name of the ClientApp, used in user interfaces. The app must translate.

Specified by:
getDisplayName in interface ClientApp
Returns:
non-null
Since:
0.9.10