Class RemoteContext

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.djutils.rmi.RmiObject
nl.tudelft.simulation.naming.context.RemoteContext
All Implemented Interfaces:
Serializable, Remote, ContextInterface, RemoteContextInterface, org.djutils.event.EventProducer
Direct Known Subclasses:
RemoteEventContext

public class RemoteContext extends org.djutils.rmi.RmiObject implements RemoteContextInterface, org.djutils.event.EventProducer
Context that exists on another computer.

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Peter Jacobs , Alexander Verbraeck
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    The RemoteChangeEventProducer is a RmiEventProducer that can fire an OBJECT_CHANGED_EVENT on behalf of an object that was changed, but does not extend an EventProducer itself.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The underlying event context.
    The (remote) event producer for this context.

    Fields inherited from class java.rmi.server.RemoteObject

    ref

    Fields inherited from interface nl.tudelft.simulation.naming.context.ContextInterface

    OBJECT_ADDED_EVENT, OBJECT_CHANGED_EVENT, OBJECT_REMOVED_EVENT, REPLACE_SEPARATOR, ROOT, SEPARATOR

    Fields inherited from interface org.djutils.event.EventProducer

    FIRST_POSITION, LAST_POSITION
  • Constructor Summary

    Constructors
    Constructor
    Description
    RemoteContext(String host, int port, String bindingKey, ContextInterface embeddedContext, String eventProducerBindingKey)
    Constructs a new RemoteContext.
    RemoteContext(URL registryURL, ContextInterface embeddedContext, String eventProducerBindingKey)
    Constructs a new RemoteContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType)
    boolean
    addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, int position)
    boolean
    addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, int position, org.djutils.event.reference.ReferenceType referenceType)
    boolean
    addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, org.djutils.event.reference.ReferenceType referenceType)
    void
    bind(String name, Object object)
    Binds an object into the Context using the name.
    Returns a (raw) map of bindings in the current context, mapping the name on the registered objects.
    void
    Binds an object into the Context using the toString() method of the object as the key.
    void
    bindObject(String key, Object object)
    Binds an object into this Context using the key.
    void
    checkCircular(Object newObject)
    Check whether a circular reference would occur when the object would be inserted into the current context.
    void
    Closes the context and removes all content from the context.
    Creates and binds a new context into the current Context using the name.
    void
    Removes the binding for an existing, empty subcontext with the given name, and recursively unbinds all objects and contexts in the context indicated by the name.
    boolean
    exists(String name)
    Indicates whether an object with the given name has been registered in the Context.
    void
    Fire an OBJECT_CHANGED_EVENT for an object with the given key in the current context.
    void
    Fire an OBJECT_CHANGED_EVENT for an object within the current context.
    get(String name)
    Retrieves the named object from the Context.
    Returns the absolute path for this context, or an empty string when this is the root context.
    Retrieves the atomic name of this context.
    org.djutils.event.EventListenerMap
     
    List<org.djutils.event.reference.Reference<org.djutils.event.EventListener>>
    getListenerReferences(org.djutils.event.EventType eventType)
    Retrieves the named object from the Context.
    Retrieves the parent context for this context, or null when this is the root context.
    Retrieves the root context for this context, or the current context when this is the root context.
    boolean
    Indicates whether the key has been registered in the current Context.
    boolean
    hasObject(Object object)
    Indicates whether the object has been registered (once or more) in the current Context.
    boolean
    Indicates whether the current context is empty.
    Returns a set of registered keys in the current context.
    void
    rebind(String name, Object object)
    Replaces an object in the Context with the given name, or registers the object when a registration with the name does not exist yet.
    void
    rebindObject(String key, Object object)
    Replaces an object in this Context with the given key, or registers the object when a registration with the key does not exist yet.
    int
    int
    boolean
    removeListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType)
    void
    rename(String oldName, String newName)
    Replaces the name under which an object has been registered in the Context.
    toString(boolean verbose)
    Return a String with the hierarchical content of the Context in case verbose is true; otherwise return the atomic name.
    void
    unbind(String name)
    Removes the binding for an object in the Context with the given name.
    void
    Removes the binding for an object in this Context with the given key.
    Returns a (raw) collection of registered values in the current context.

    Methods inherited from class org.djutils.rmi.RmiObject

    getRegistry, register

    Methods inherited from class java.rmi.server.RemoteServer

    getClientHost, getLog, setLog

    Methods inherited from class java.rmi.server.RemoteObject

    equals, getRef, hashCode, toStub

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.djutils.event.EventProducer

    fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners
  • Field Details

  • Constructor Details

    • RemoteContext

      public RemoteContext(String host, int port, String bindingKey, ContextInterface embeddedContext, String eventProducerBindingKey) throws RemoteException, AlreadyBoundException
      Constructs a new RemoteContext. Register the new context in the RMI registry. When the RMI registry does not exist yet, it will be created, but only on the local host. Remote creation of a registry on another computer is not possible. Any attempt to do so will cause an AccessException to be fired.
      Parameters:
      host - String; the host where the RMI registry resides or will be created. Creation is only possible on localhost.
      port - int; the port where the RMI registry can be found or will be created
      bindingKey - the key under which this context will be bound in the RMI registry
      embeddedContext - ContextInterface; the underlying context
      eventProducerBindingKey - String; the key under which the event producer will be bound
      Throws:
      RemoteException - when there is a problem with the RMI registry
      AlreadyBoundException - when there is already another object bound to the bindingKey
      NullPointerException - when host, path, or bindingKey is null
      IllegalArgumentException - when port < 0 or port > 65535
      AccessException - when there is an attempt to create a registry on a remote host
    • RemoteContext

      public RemoteContext(URL registryURL, ContextInterface embeddedContext, String eventProducerBindingKey) throws RemoteException, AlreadyBoundException
      Constructs a new RemoteContext. Register the new context in the RMI registry. When the host has not been specified in the URL, 127.0.0.1 will be used. When the port has not been specified in the URL, the default RMI port 1099 will be used. When the RMI registry does not exist yet, it will be created, but only on the local host. Remote creation of a registry on another computer is not possible. Any attempt to do so will cause an AccessException to be fired.
      Parameters:
      registryURL - URL; the URL of the registry, e.g., "http://localhost:1099" or "http://130.161.185.14:28452"
      embeddedContext - ContextInterface; the underlying context
      eventProducerBindingKey - String; the key under which the event producer will be bound
      Throws:
      RemoteException - when there is a problem with the RMI registry
      AlreadyBoundException - when there is already another object bound to the bindingKey
      NullPointerException - when registryURL, bindingKey, or embeddedContext is null
      AccessException - when there is an attempt to create a registry on a remote host
  • Method Details

    • getAtomicName

      public String getAtomicName() throws RemoteException
      Retrieves the atomic name of this context.
      Specified by:
      getAtomicName in interface ContextInterface
      Returns:
      String; the atomic name of this context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • getParent

      public ContextInterface getParent() throws RemoteException
      Retrieves the parent context for this context, or null when this is the root context.
      Specified by:
      getParent in interface ContextInterface
      Returns:
      ContextInterface; parent context for this context, or null when this is the root context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • getRootContext

      public ContextInterface getRootContext() throws RemoteException
      Retrieves the root context for this context, or the current context when this is the root context.
      Specified by:
      getRootContext in interface ContextInterface
      Returns:
      ContextInterface; the root context for this context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • getAbsolutePath

      public String getAbsolutePath() throws RemoteException
      Returns the absolute path for this context, or an empty string when this is the root context.
      Specified by:
      getAbsolutePath in interface ContextInterface
      Returns:
      String; the absolute path for this context, or an empty string when this is the root context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • get

      public Object get(String name) throws NamingException, RemoteException
      Retrieves the named object from the Context. The name may be a compound name where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts must exist. When name is the empty String or "/", the current Context is returned.
      Specified by:
      get in interface ContextInterface
      Parameters:
      name - String; the name of the object to look up; may be a compound name
      Returns:
      Object; the Context or Object indicated by the name
      Throws:
      NamingException - as a placeholder overarching exception
      NameNotFoundException - if an intermediate context or the reference does not exist
      RemoteException - on a network error when the Context is used over RMI
    • getObject

      public Object getObject(String key) throws NamingException, RemoteException
      Retrieves the named object from the Context. The key is not compound. Key cannot be empty or contain "/".
      Specified by:
      getObject in interface ContextInterface
      Parameters:
      key - String; the name of the object to look up; NOT a compound name
      Returns:
      Object; the Context or Object indicated by the key
      Throws:
      NamingException - when key is the empty string or when key contains "/"
      NameNotFoundException - if the key does not exist in the current context
      RemoteException - on a network error when the Context is used over RMI
    • exists

      public boolean exists(String name) throws NamingException, RemoteException
      Indicates whether an object with the given name has been registered in the Context. The name may be a compound name where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts must exist. When name is the empty String or "/", the method returns true.
      Specified by:
      exists in interface ContextInterface
      Parameters:
      name - String; the name of the object to look up; may be a compound name
      Returns:
      boolean; whether an object with the given name has been registered
      Throws:
      NamingException - as a placeholder overarching exception
      NameNotFoundException - when an intermediate context does not exist
      RemoteException - on a network error when the Context is used over RMI
    • hasKey

      public boolean hasKey(String key) throws NamingException, RemoteException
      Indicates whether the key has been registered in the current Context. The name is not compound. When name is the empty String or "/", the method returns an exception.
      Specified by:
      hasKey in interface ContextInterface
      Parameters:
      key - String; the name of the object to look up; NOT compound
      Returns:
      boolean; whether an object with the given key has been registered in the current context
      Throws:
      NamingException - when key is the empty string or when key contains "/"
      RemoteException - on a network error when the Context is used over RMI
    • hasObject

      public boolean hasObject(Object object) throws RemoteException
      Indicates whether the object has been registered (once or more) in the current Context. The object may be null.
      Specified by:
      hasObject in interface ContextInterface
      Parameters:
      object - Object; the object to look up; mey be null
      Returns:
      boolean; whether an object with the given key has been registered once or more in the current context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • isEmpty

      public boolean isEmpty() throws RemoteException
      Indicates whether the current context is empty.
      Specified by:
      isEmpty in interface ContextInterface
      Returns:
      boolean; whether the current context is empty
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • bind

      public void bind(String name, Object object) throws NamingException, RemoteException
      Binds an object into the Context using the name. The name may be a compound name where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts must already exist. The object will be registered using the terminal atomic reference in the deepest subcontext provided. Name cannot be empty or "/". An OBJECT_ADDED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the object when a new binding has taken place.
      Specified by:
      bind in interface ContextInterface
      Parameters:
      name - String; the name under which the object will be stored; may be a compound name with the terminal reference indicating the key under which the object will be stored
      object - Object; the Context or Object to be stored into the given context; a null object is allowed
      Throws:
      NamingException - when the reference is "/" or empty
      NameAlreadyBoundException - if name is already bound to an object
      NameNotFoundException - when an intermediate context does not exist
      RemoteException - on a network error when the Context is used over RMI
    • bindObject

      public void bindObject(String key, Object object) throws NamingException, RemoteException
      Binds an object into this Context using the key. The key is not compound. The key cannot be empty or "/". An OBJECT_ADDED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the object when a new binding has taken place.
      Specified by:
      bindObject in interface ContextInterface
      Parameters:
      key - String; the key under which the object will be stored; NOT a compound name
      object - Object; the Context or Object to be stored into this Context using the given name; a null object is allowed
      Throws:
      NamingException - when key is the empty string or when key contains "/"
      NameAlreadyBoundException - if key is already bound to an object
      RemoteException - on a network error when the Context is used over RMI
    • bindObject

      public void bindObject(Object object) throws NamingException, RemoteException
      Binds an object into the Context using the toString() method of the object as the key. All "/" characters in the toString() result will be replaced by "#" characters. An OBJECT_ADDED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the object when a new binding has taken place.
      Specified by:
      bindObject in interface ContextInterface
      Parameters:
      object - Object; the Context or Object to be stored into this Context using the toString() result as the key; a null object is not allowed
      Throws:
      NamingException - when the toString() of the object results in an empty string
      NameAlreadyBoundException - if key is already bound to an object
      RemoteException - on a network error when the Context is used over RMI
    • unbind

      public void unbind(String name) throws NamingException, RemoteException
      Removes the binding for an object in the Context with the given name. The name may be a compound name where parts are separated by separation strings indicating subcontexts. Name cannot be empty or "/". It is not a problem when there is no object registered with the given name. An OBJECT_REMOVED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the removed object when a binding has been removed.
      Specified by:
      unbind in interface ContextInterface
      Parameters:
      name - String; the name of the object that has to be removed; may be a compound name with the terminal reference indicating the key under which the object is stored
      Throws:
      NamingException - when the reference is "/" or empty
      NameNotFoundException - when an intermediate context does not exist
      RemoteException - on a network error when the Context is used over RMI
    • unbindObject

      public void unbindObject(String key) throws NamingException, RemoteException
      Removes the binding for an object in this Context with the given key. The key is not compound. The key cannot be empty or "/". It is not a problem when there is no object registered with the given key. An OBJECT_REMOVED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the removed object when a binding has been removed.
      Specified by:
      unbindObject in interface ContextInterface
      Parameters:
      key - String; the key of the object that has to be removed; NOT a compound name
      Throws:
      NamingException - when key is the empty string or when key contains "/"
      RemoteException - on a network error when the Context is used over RMI
    • rebind

      public void rebind(String name, Object object) throws NamingException, RemoteException
      Replaces an object in the Context with the given name, or registers the object when a registration with the name does not exist yet. The name may be a compound name where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts must already exist. The object will be (re)registered using the terminal atomic reference in the deepest subcontext provided. Name cannot be empty or "/". An OBJECT_REMOVED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the removed object when a binding had to be removed, followed by an OBJECT_ADDED_EVENT containing an object array with a pointer to the context, the key, and the new object when a new binding has taken place.
      Specified by:
      rebind in interface ContextInterface
      Parameters:
      name - String; the name of the object to be replaced, or under which the object will be stored; may be a compound name with the terminal reference indicating the key under which the object will be stored
      object - Object; the Context or Object to be replaced or stored into this Context using the given name; a null object is allowed
      Throws:
      NamingException - when the reference is "/" or empty
      NameNotFoundException - when an intermediate context does not exist
      RemoteException - on a network error when the Context is used over RMI
    • rebindObject

      public void rebindObject(String key, Object object) throws NamingException, RemoteException
      Replaces an object in this Context with the given key, or registers the object when a registration with the key does not exist yet. The key is not a compound name. Name cannot be empty or "/". An OBJECT_REMOVED_EVENT is fired containing an object array with a pointer to the context, the relative key, and the removed object when a binding had to be removed, followed by an OBJECT_ADDED_EVENT containing an object array with a pointer to the context, the key, and the new object when a new binding has taken place.
      Specified by:
      rebindObject in interface ContextInterface
      Parameters:
      key - String; the key of the object to be replaced, or under which the object will be stored; NOT a compound name
      object - Object; the Context or Object to be replaced or stored into this Context using the given name; a null object is allowed
      Throws:
      NamingException - when key is the empty string or when key contains "/"
      RemoteException - on a network error when the Context is used over RMI
    • rename

      public void rename(String oldName, String newName) throws NamingException, RemoteException
      Replaces the name under which an object has been registered in the Context. Both names are relative to the current Context, and may be compound names where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts of the new name must already exist. The object will be deregistered under the old name, and reregistered using the terminal atomic reference in the deepest subcontext of the newName. Nether the oldName, nor the newName can be empty or "/". An OBJECT_REMOVED_EVENT is fired containing an object array with a pointer to the old context, the old relative key, and the object when a binding had to be removed, followed by an OBJECT_ADDED_EVENT containing an object array with a pointer to the new context, the new relative key, and the object when a new binding has taken place. When the new name is illegal or occupied, the object will not be renamed.
      Specified by:
      rename in interface ContextInterface
      Parameters:
      oldName - String; the (compound) name of the object to be moved to a new location
      newName - String; the (compound) name with the terminal reference indicating where the object will be stored
      Throws:
      NamingException - when the reference of oldName or newName is "/" or empty
      NameNotFoundException - when an intermediate context of oldName or newName does not exist, or when there is no registration at the oldName reference
      NameAlreadyBoundException - if newName is already bound to an object
      RemoteException - on a network error when the Context is used over RMI
    • createSubcontext

      public ContextInterface createSubcontext(String name) throws NamingException, RemoteException
      Creates and binds a new context into the current Context using the name. The name may be a compound name where parts are separated by separation strings indicating subcontexts. All intermediate subcontexts that do not yet exist, will be created. The new context will be registered using the terminal atomic reference in the deepest subcontext provided. Name cannot be empty or "/". On success, OBJECT_ADDED_EVENTs are fired for the created context and each new intermediate context, containing an object array with an object array with a pointer to the embedding context, the local key in the embedding context, and the newly created (intermediate) context.
      Specified by:
      createSubcontext in interface ContextInterface
      Parameters:
      name - String; the name under which the new context will be stored; may be a compound name with the terminal reference indicating the key under which the new context will be stored
      Returns:
      ContextInterface; a pointer to the newly created subcontext
      Throws:
      NamingException - when the terminal reference is "/" or empty
      NameNotFoundException - when an intermediate context does not exist
      NameAlreadyBoundException - if name is already bound to an object or context
      RemoteException - on a network error when the Context is used over RMI
    • destroySubcontext

      public void destroySubcontext(String name) throws NamingException, RemoteException
      Removes the binding for an existing, empty subcontext with the given name, and recursively unbinds all objects and contexts in the context indicated by the name. The name may be a compound name where parts are separated by separation strings indicating subcontexts. Name cannot be empty or "/". A context has to be registered with the given name. For all removed objects and contexts, OBJECT_REMOVED_EVENT events are fired containing an object array with a pointer to the context from which content has been removed, the key of the binding that has been removed, and the removed object. The OBJECT_REMOVED_EVENT events are fired in depth-first order.
      Specified by:
      destroySubcontext in interface ContextInterface
      Parameters:
      name - String; the name of the object that has to be removed; may be a compound name with the terminal reference indicating the key under which the object is stored
      Throws:
      NamingException - when the reference is "/" or empty
      NotContextException - if the name is bound but does not name a context
      NameNotFoundException - when an intermediate context does not exist, or when no object is registered with the terminating atomic reference
      RemoteException - on a network error when the Context is used over RMI
    • keySet

      public Set<String> keySet() throws RemoteException
      Returns a set of registered keys in the current context.
      Specified by:
      keySet in interface ContextInterface
      Returns:
      Set<String>; a set of registered keys in the current context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • values

      public Collection<Object> values() throws RemoteException
      Returns a (raw) collection of registered values in the current context.
      Specified by:
      values in interface ContextInterface
      Returns:
      Collection<Object>; a raw set of registered objects in the current context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • bindings

      public Map<String,Object> bindings() throws RemoteException
      Returns a (raw) map of bindings in the current context, mapping the name on the registered objects. Both regular objects and subcontexts are returned. Mappings to null objects can exist.
      Specified by:
      bindings in interface ContextInterface
      Returns:
      Map<String, Object>; a map of registered names and their bound (possibly null) object in the current context
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • checkCircular

      public void checkCircular(Object newObject) throws NamingException, RemoteException
      Check whether a circular reference would occur when the object would be inserted into the current context. Insertion potentially causes a problem when the object to be inserted is a Context.
      Specified by:
      checkCircular in interface ContextInterface
      Parameters:
      newObject - the object to be inserted
      Throws:
      NamingException - when a circular reference would occur
      RemoteException - on a network error when the Context is used over RMI
    • close

      public void close() throws NamingException, RemoteException
      Closes the context and removes all content from the context. No events will be fired that the content of the context has been removed. Some contexts, such as the FileContext could have to be really closed as well.
      Specified by:
      close in interface ContextInterface
      Throws:
      NamingException - when a problem occurs during closing (e.g., of a FileContext)
      RemoteException - on a network error when the Context is used over RMI
    • fireObjectChangedEventValue

      public void fireObjectChangedEventValue(Object object) throws NameNotFoundException, NullPointerException, NamingException, RemoteException
      Fire an OBJECT_CHANGED_EVENT for an object within the current context. Look up if the the object exists using the toString() method of the object as the key. All "/" characters in the toString() result will be replaced by "#" characters. When the object does not exist directly in the context, a NameNotFoundException is thrown.
      Specified by:
      fireObjectChangedEventValue in interface ContextInterface
      Parameters:
      object - Object; the object that has changed and for which an event should be fired
      Throws:
      NameNotFoundException - when no object is registered with object.toString() as the key
      NullPointerException - when object is null
      NamingException - on general error in the method, e.g., a problem with remote connections
      RemoteException - on a network error when the Context is used over RMI
    • fireObjectChangedEventKey

      public void fireObjectChangedEventKey(String key) throws NameNotFoundException, NullPointerException, NamingException, RemoteException
      Fire an OBJECT_CHANGED_EVENT for an object with the given key in the current context. If the the key does not exist directly in the context, a NameNotFoundException is thrown. The key should not be the empty String or contain "/" characters.
      Specified by:
      fireObjectChangedEventKey in interface ContextInterface
      Parameters:
      key - String; the key within the context of the object that has changed and for which an event should be fired
      Throws:
      NameNotFoundException - when no object is registered with the key in the given context
      NullPointerException - when key is null
      NamingException - when key is the empty string or when key contains "/", or on a general error in the method, e.g., a problem with remote connections
      RemoteException - on a network error when the Context is used over RMI
    • toString

      public String toString()
      Overrides:
      toString in class RemoteObject
    • toString

      public String toString(boolean verbose) throws RemoteException
      Return a String with the hierarchical content of the Context in case verbose is true; otherwise return the atomic name.
      Specified by:
      toString in interface ContextInterface
      Parameters:
      verbose - boolean; whether the information is exhaustive or very brief
      Returns:
      String; formatted content of the context when verbose is true; otherwise the atomic name
      Throws:
      RemoteException - on a network error when the Context is used over RMI
    • addListener

      public boolean addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType) throws RemoteException
      Specified by:
      addListener in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • addListener

      public boolean addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, org.djutils.event.reference.ReferenceType referenceType) throws RemoteException
      Specified by:
      addListener in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • addListener

      public boolean addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, int position) throws RemoteException
      Specified by:
      addListener in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • addListener

      public boolean addListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType, int position, org.djutils.event.reference.ReferenceType referenceType) throws RemoteException
      Specified by:
      addListener in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • removeAllListeners

      public int removeAllListeners() throws RemoteException
      Specified by:
      removeAllListeners in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • removeAllListeners

      public int removeAllListeners(Class<?> ofClass) throws RemoteException
      Specified by:
      removeAllListeners in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • removeListener

      public boolean removeListener(org.djutils.event.EventListener listener, org.djutils.event.EventType eventType) throws RemoteException
      Specified by:
      removeListener in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • getListenerReferences

      public List<org.djutils.event.reference.Reference<org.djutils.event.EventListener>> getListenerReferences(org.djutils.event.EventType eventType) throws RemoteException
      Specified by:
      getListenerReferences in interface org.djutils.event.EventProducer
      Throws:
      RemoteException
    • getEventListenerMap

      public org.djutils.event.EventListenerMap getEventListenerMap() throws RemoteException
      Specified by:
      getEventListenerMap in interface org.djutils.event.EventProducer
      Throws:
      RemoteException