|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.lib.Gnutella.GnutellaCatcher
public class GnutellaCatcher
Nested Class Summary | |
---|---|
private class |
GnutellaCatcher.searchDepth
|
Field Summary | |
---|---|
private static boolean |
DEBUG
|
private GnutellaServer |
gs
|
private ManagerIF |
mgr
|
private GnutellaServer |
mygs
|
private int |
num_established
|
private static int |
SEARCH_DEPTH
|
private java.util.Hashtable |
searchTbl
|
private int |
total
|
Constructor Summary | |
---|---|
GnutellaCatcher(ManagerIF mgr,
GnutellaServer gs)
Create a GnutellaCatcher in the context of the given vSpace clone, using the given GnutellaServer to establish new outgoing connections. |
Method Summary | |
---|---|
void |
destroy()
Called when an event handler is destroyed. |
void |
doCatch(int numconns)
Create 'numconns' new connections to the Gnutella network, using "gnutellahosts.com:6346" as the bootstrapping host. |
void |
doCatch(int numconns,
java.lang.String hostname,
int port)
Create 'numconns' new connections to the Gnutella network, using the given hostname:port as the bootstrapping host. |
void |
handleEvent(QueueElementIF item)
Handle the event corresponding to the given QueueElementIF. |
void |
handleEvents(QueueElementIF[] qelarr)
Handle the events corresponding to the given QueueElementIF array. |
void |
init(ConfigDataIF config)
Called when an event handler is initialized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private static final int SEARCH_DEPTH
private ManagerIF mgr
private GnutellaServer gs
private GnutellaServer mygs
private int total
private int num_established
private java.util.Hashtable searchTbl
Constructor Detail |
---|
public GnutellaCatcher(ManagerIF mgr, GnutellaServer gs) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void init(ConfigDataIF config) throws java.lang.Exception
EventHandlerIF
init
in interface EventHandlerIF
config
- The set of configuration parameters for the stage.
java.lang.Exception
- The EventHandler can indicate an
error to the runtime during initialization by throwing an
Exception.public void destroy()
EventHandlerIF
destroy
in interface EventHandlerIF
public void doCatch(int numconns, java.lang.String hostname, int port) throws java.net.UnknownHostException
java.net.UnknownHostException
public void doCatch(int numconns) throws java.net.UnknownHostException
java.net.UnknownHostException
public void handleEvent(QueueElementIF item)
EventHandlerIF
handleEvent
in interface EventHandlerIF
public void handleEvents(QueueElementIF[] qelarr)
EventHandlerIF
handleEvents
in interface EventHandlerIF
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |