public class KnownAgents extends Object implements Serializable
| Constructor and Description |
|---|
KnownAgents()
Constructor for
KnownAgents. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAgent(org.jboss.remoting.InvokerLocator endpoint)
Adds the given remote endpoint to the list of known agents.
|
boolean |
addAgent(String endpoint)
Adds the given remote endpoint to the list of known agents.
|
org.jboss.remoting.InvokerLocator |
getAgent(String host,
int port)
Given a specific host and port, this will return the associated agent.
|
List<org.jboss.remoting.InvokerLocator> |
getAllAgents()
Returns a list of all the known agents.
|
boolean |
removeAgent(org.jboss.remoting.InvokerLocator endpoint)
Removes the given remote endpoint from the list of known agents.
|
boolean |
removeAgent(String endpoint)
Removes the given remote endpoint from the list of known agents.
|
void |
removeAllAgents()
Empties the internal list of agents.
|
public KnownAgents()
KnownAgents.public boolean addAgent(org.jboss.remoting.InvokerLocator endpoint)
endpoint - the endpoint to add if it refers to an agenttrue if the endpoint was an agent and it was added; false if the endpoint was
not an agent and nothing was added to the internal list of known agentspublic boolean addAgent(String endpoint)
endpoint is a String so you can call this
method by directly using a value from Agent.getRemoteEndpoint().endpoint - the endpoint to add if it refers to an agenttrue if the endpoint was an agent and it was added; false if the endpoint was
not an agent and nothing was added to the internal list of known agentsRuntimeException - if the endpoint was malformed and invalidpublic boolean removeAgent(org.jboss.remoting.InvokerLocator endpoint)
false.endpoint - the endpoint to removetrue if the agent existed and was removed; false otherwisepublic boolean removeAgent(String endpoint)
false. The given endpoint is a String so
you can call this method by directly using a value from Agent.getRemoteEndpoint().endpoint - the endpoint to removetrue if the agent existed and was removed; false otherwiseRuntimeException - if the endpoint was malformed and invalidpublic org.jboss.remoting.InvokerLocator getAgent(String host, int port)
host - the host of the agent to retrieveport - the port of the agent to retrievenull if no known agent exists in the listpublic List<org.jboss.remoting.InvokerLocator> getAllAgents()
public void removeAllAgents()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.