prueba1.access
Class Proxy
java.lang.Object
|
+--prueba1.access.Proxy
- public class Proxy
- extends java.lang.Object
This class is a permanent reference to an agent. The platform guarantees you that
the proxy will always keep the reference to the agent.
Constructor Summary |
Proxy(AccessService _AS,
java.lang.String _agentName)
The constructor of the class. |
Method Summary |
java.lang.Object |
invokeMethod(java.lang.String _methodName,
java.lang.Object[] _args)
Invokes a method of the agent. |
void |
updateRef(java.lang.String _newLocation)
Updates the reference of the agent, from his current position to the new one, passed
as a parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Proxy
public Proxy(AccessService _AS,
java.lang.String _agentName)
- The constructor of the class.
Gets the reference to the agent that is given as a paremeter. The Proxy takes
the responsability of finding the agent.
invokeMethod
public java.lang.Object invokeMethod(java.lang.String _methodName,
java.lang.Object[] _args)
- Invokes a method of the agent. At this moment only permits a generic invocation.
- Parameters:
_methodName
- The name of the method that is to be invoked._args
- Possible arguments of the method.- Returns:
- As long as the method can return anything, the most generic possibility
is to return an Object so that it's possible to match any possibility.
updateRef
public void updateRef(java.lang.String _newLocation)
- Updates the reference of the agent, from his current position to the new one, passed
as a parameter.
- Parameters:
_newLocation
- The new location expressed as a String containing the new IP
of the new platform.