Class RemoteContext.RemoteChangeEventProducer

    • Constructor Detail

      • RemoteChangeEventProducer

        public RemoteChangeEventProducer​(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 - 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
    • Method Detail

      • fireChangedEvent

        protected void fireChangedEvent​(EventType eventType,
                                        Serializable value)
                                 throws RemoteException
        Transmit an changed event with a serializable object as payload to all interested listeners.
        Parameters:
        eventType - EventType; the eventType of the event
        value - Serializable; the object sent with the event
        Throws:
        RemoteException - on network error