Class RemoteEventListener

    • Constructor Detail

      • RemoteEventListener

        public RemoteEventListener​(String host,
                                   int port,
                                   String bindingKey)
                            throws RemoteException,
                                   AlreadyBoundException
        Create a remote event listener and register the listener 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 - String; the key under which this object will be bound in the RMI registry
        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
      • RemoteEventListener

        public RemoteEventListener​(URL registryURL,
                                   String bindingKey)
                            throws RemoteException,
                                   AlreadyBoundException
        Create a remote event listener and register the listener 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"
        bindingKey - String; the key under which this object will be bound in the RMI registry
        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 or bindingKey is null
        AccessException - when there is an attempt to create a registry on a remote host