agentland.software
Class SynchronizedBrowserEHA

java.lang.Object
  |
  +--agentland.software.SynchronizedBrowserEHA

public class SynchronizedBrowserEHA
extends Object
implements ExceptionHandler, SynchronizedBrowser, WindowsWebBrowser


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
SynchronizedBrowserEHA(MetagluePrimitives ap, AgentID agentID, Catalog c)
           
 
Method Summary
 void addMonitor(Spy param0)
          Add a log monitor that gets all the screen output.
 void addSpy(AgentID param0, String param1)
          This assumes the Spy implements the Spy interface.
 void addSpy(AgentID param0, String param1, String param2)
          Registers an agent as having an interest in certain messages.
 boolean alive()
           
 Agent getAgent()
          get the internal stub used.
 AgentID getAgentID()
           
 AgentID getAgtID()
          get the internal agentID used.
 AgentID getMetaglueAgentID()
           
 String getSyncID()
           
 String getURL()
           
 void gossip(Secret param0)
          Does the same work as notify.
 void goURL(String param0)
           
 void hearURLchange(Secret param0)
           
 void instantiate(Agent a)
           
 void notify(Secret param0)
          Sends a notification to any agents who have registered an interest in the given notification type.
 void notifyAllBrowsers(Secret param0)
           
 void notifyStatus(Secret param0)
           
 void passNotify(Secret param0)
          So we can chain notifiers together in big nets o fun.
 void removeAllSpies()
           
 void removeSpy(AgentID param0, String param1)
          This assumes the spy implements the Spy interface.
 void removeSpy(AgentID param0, String param1, String param2)
          Unregisters an agent from having an interest in certain messages.
 void replaceExceptionHandler(AgentExceptionHandler r)
           
 void setAgent(Agent a)
          set the internal stub used to passed agent.
 void setAgtID(AgentID a)
          set the internal agentID used to passed agent.
 void shutdown()
           
 void startup()
           
 void syncWith(String param0)
           
 InetAddress whereAreYou()
          Returns the InetAddress of the machine where the agent is running
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedBrowserEHA

public SynchronizedBrowserEHA(MetagluePrimitives ap,
                              AgentID agentID,
                              Catalog c)
                       throws RemoteException
Method Detail

getAgent

public Agent getAgent()
Description copied from interface: ExceptionHandler
get the internal stub used. (Used for resource management interception)
Specified by:
getAgent in interface ExceptionHandler

setAgent

public void setAgent(Agent a)
Description copied from interface: ExceptionHandler
set the internal stub used to passed agent. (Used for resource management interception)
Specified by:
setAgent in interface ExceptionHandler

getAgtID

public AgentID getAgtID()
Description copied from interface: ExceptionHandler
get the internal agentID used. (Used for resource management interception)
Specified by:
getAgtID in interface ExceptionHandler

setAgtID

public void setAgtID(AgentID a)
Description copied from interface: ExceptionHandler
set the internal agentID used to passed agent. (Used for resource management interception)
Specified by:
setAgtID in interface ExceptionHandler

instantiate

public void instantiate(Agent a)
Specified by:
instantiate in interface ExceptionHandler

replaceExceptionHandler

public void replaceExceptionHandler(AgentExceptionHandler r)
Specified by:
replaceExceptionHandler in interface ExceptionHandler

addMonitor

public void addMonitor(Spy param0)
                throws RemoteException
Description copied from interface: Agent
Add a log monitor that gets all the screen output.

alive

public boolean alive()
              throws RemoteException

getAgentID

public AgentID getAgentID()

getMetaglueAgentID

public AgentID getMetaglueAgentID()
                           throws RemoteException

shutdown

public void shutdown()
              throws RemoteException

startup

public void startup()
             throws RemoteException

whereAreYou

public InetAddress whereAreYou()
                        throws RemoteException
Description copied from interface: Agent
Returns the InetAddress of the machine where the agent is running

addSpy

public void addSpy(AgentID param0,
                   String param1)
            throws RemoteException
Description copied from interface: Notifier
This assumes the Spy implements the Spy interface.

addSpy

public void addSpy(AgentID param0,
                   String param1,
                   String param2)
            throws RemoteException
Description copied from interface: Notifier
Registers an agent as having an interest in certain messages. To remove the registration, call removeSpy with the same arguments.
Tags copied from interface: Notifier
Parameters:
spyName - The spy to be found.
callMethod - A string specifying the method name to call when the requested notification occurs. The method should return void, and take two arguments; first, a String specifying the notification type, and second, another String with extra information. This is the same signature as the notify method in this class.
noteType - A simple string specifying the type of the notification. Any Secret with a name string which _begins_ with the passed notetype will be sent to the spy. So if a spy registers for Boogie events, then a Boogie.Down event will get shipped to the spy as well as strict Boogie events.
See Also:
AgentAgent.reliesOn(java.lang.String), Notifier.removeSpy(metaglue.AgentID, java.lang.String, java.lang.String), Notifier.notify(agentland.util.Secret)

gossip

public void gossip(Secret param0)
            throws RemoteException
Description copied from interface: Notifier
Does the same work as notify.
Tags copied from interface: Notifier
See Also:
Notifier.notify(Secret)

notify

public void notify(Secret param0)
            throws RemoteException
Description copied from interface: Notifier
Sends a notification to any agents who have registered an interest in the given notification type. Also provides extra information to the agents.
Tags copied from interface: Notifier
Parameters:
secret - This is the Secret to pass to any registered Spy agents.

passNotify

public void passNotify(Secret param0)
                throws RemoteException
Description copied from interface: Notifier
So we can chain notifiers together in big nets o fun. It calls notify if and only if the society of the secret sender is not the same as ours

removeAllSpies

public void removeAllSpies()
                    throws RemoteException

removeSpy

public void removeSpy(AgentID param0,
                      String param1)
               throws RemoteException
Description copied from interface: Notifier
This assumes the spy implements the Spy interface.

removeSpy

public void removeSpy(AgentID param0,
                      String param1,
                      String param2)
               throws RemoteException
Description copied from interface: Notifier
Unregisters an agent from having an interest in certain messages. The three parameters should be the same as were previously used in the addSpy call.
Tags copied from interface: Notifier
Parameters:
spyName - A string specifiying the agent's class name.
callMethod - A string specifying the method name.
noteType - A string specifying the type of the notification.
See Also:
AgentAgent.reliesOn(java.lang.String), Notifier.addSpy(metaglue.AgentID, java.lang.String, java.lang.String), Notifier.notify(agentland.util.Secret)

getURL

public String getURL()
              throws RemoteException
Specified by:
getURL in interface WindowsWebBrowser

goURL

public void goURL(String param0)
           throws RemoteException
Specified by:
goURL in interface WindowsWebBrowser

getSyncID

public String getSyncID()
                 throws RemoteException
Specified by:
getSyncID in interface SynchronizedBrowser

hearURLchange

public void hearURLchange(Secret param0)
                   throws RemoteException
Specified by:
hearURLchange in interface SynchronizedBrowser

notifyAllBrowsers

public void notifyAllBrowsers(Secret param0)
                       throws RemoteException
Specified by:
notifyAllBrowsers in interface SynchronizedBrowser

notifyStatus

public void notifyStatus(Secret param0)
                  throws RemoteException
Specified by:
notifyStatus in interface SynchronizedBrowser

syncWith

public void syncWith(String param0)
              throws RemoteException
Specified by:
syncWith in interface SynchronizedBrowser