agentland.util
Class AgentRegexp
java.lang.Object
|
+--agentland.util.AgentRegexp
- public class AgentRegexp
- extends Object
Allowing for reg exp matching on agent IDs.
Makes good filters for the Catalog Enumeration method.
Method Summary |
static Filter |
makeFilter(String socMatch,
String occMatch,
String desMatch)
Make filter for catalog that does the agentID regexp stuff. |
static Filter |
makeMetaglueAgentFilter(String socMatch,
String host)
For use in catalog to find all metaglue agents on a given host
machine. |
static Filter |
makeMetaglueAgentFilter(String socMatch,
String host,
String name)
For use in catalog to find all metaglue agents on a given host
machine. |
static boolean |
matchID(AgentID id,
String socMatch,
String occMatch,
String desMatch)
This returns true if id matches match criterion. |
static Vector |
prune(Collection v,
String socMatch,
String occMatch,
String desMatch)
Do the matchID on the vector, return all matches. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AgentRegexp
public AgentRegexp()
makeFilter
public static Filter makeFilter(String socMatch,
String occMatch,
String desMatch)
- Make filter for catalog that does the agentID regexp stuff.
Using this on enumerateAgents will return an enumeration of all
of the AgentID's in this catalog It will make sure each element
passed matches (as a substring) NULL for any of the matching
parts is the wildcard.
eg: enumerateAgents( "luke", "metaglue.MetaglueAgent", nul ) gives
all metaglue agents for society luke.
makeMetaglueAgentFilter
public static Filter makeMetaglueAgentFilter(String socMatch,
String host)
- For use in catalog to find all metaglue agents on a given host
machine.
- Parameters:
host
- the machine home for metaglue agents desired
makeMetaglueAgentFilter
public static Filter makeMetaglueAgentFilter(String socMatch,
String host,
String name)
- For use in catalog to find all metaglue agents on a given host
machine.
- Parameters:
host
- the machine home for metaglue agents desiredname
- the christan name of the agent
prune
public static Vector prune(Collection v,
String socMatch,
String occMatch,
String desMatch)
- Do the matchID on the vector, return all matches.
matchID
public static boolean matchID(AgentID id,
String socMatch,
String occMatch,
String desMatch)
- This returns true if id matches match criterion. Null means
wildcard. $ means beginning or ending of the String.