|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.semoa.net.farsight.DiscoveryStrategy de.fhg.igd.semoa.net.farsight.ExplorerStrategy
This discovery strategy uses mobile agents to detect SeMoA hosts. The used agent type is ExplorerAgent.
On creation of this class the AgentArrivalFilter is installed in the filter pipeline of SeMoA. Every incoming agent is tested for certain properties. If the agent is accepted, an ExplorerAgent will be created that will examine the SeMoA host the incoming agent did come from. The following must not be true for the incoming agent:
ExplorerAgent
Field Summary | |
private static Logger |
log_
The Logger instance for this class |
private static String |
VALID_PREFIX_CHARS
Sorted list of valid filter prefix characters (see installAgentArrivalFilter() . |
Fields inherited from class de.fhg.igd.semoa.net.farsight.DiscoveryStrategy |
|
Constructor Summary | |
ExplorerStrategy(String config)
Sole constructor. |
Method Summary | |
void |
agentArrived(AgentContext context)
Called by the AgentArrivalFilter when a new agent arrives at
this SeMoA server. |
private void |
explore(Map contacts)
Sends an ExplorerAgent to every value from the contacts map. |
private static URL |
getRawURL(URL shipURL)
Replaces the protocol of shipURL with "raw". |
private void |
installAgentArrivalFilter()
Installs the AgentArrivalFilter into this SeMoA server's
filter pipeline. |
protected boolean |
isExplorer(AgentContext context)
Returns whether a given agent context is a ExplorerAgent. |
protected boolean |
isKnownHost(URL url)
Checks whether FarSight does already know the host at url. |
private void |
loadDefaultGateways()
Reads the default gateways from the properties file and sends an ExplorerAgent . |
static void |
sendExplorer(URL target)
Sends an ExplorerAgent to a given target. |
Methods inherited from class de.fhg.igd.semoa.net.farsight.DiscoveryStrategy |
getConfig |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String VALID_PREFIX_CHARS
installAgentArrivalFilter()
.
private static Logger log_
Logger
instance for this class
Constructor Detail |
public ExplorerStrategy(String config) throws ObjectExistsException
Method Detail |
public void agentArrived(AgentContext context)
AgentArrivalFilter
when a new agent arrives at
this SeMoA server.
agentArrived
in interface ArrivalListener
context
- The agent context of the arriving agent.private void explore(Map contacts)
ExplorerAgent
to every value from the contacts map.
public static void sendExplorer(URL target)
ExplorerAgent
to a given target. The protocol of the
target URL will be set to "raw".
private static URL getRawURL(URL shipURL) throws ShipException, MalformedURLException
shipURL
with "raw".
ShipException
MalformedURLException
protected boolean isExplorer(AgentContext context)
protected boolean isKnownHost(URL url)
url.
private void installAgentArrivalFilter() throws ObjectExistsException
AgentArrivalFilter
into this SeMoA server's
filter pipeline.
ObjectExistsException
private void loadDefaultGateways()
ExplorerAgent
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |