Interface BaseClientInterface

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COPYRIGHT
      The copyright statement that is displayed in the usage string of a number of components.
      static int DEFAULT_CONNECTION_POLLING_INTERVAL
      The default value for the connectionPollingInterval property in milliseconds.
      static java.lang.String DEFAULT_HOST
      The default value for the host property, see ConnectionConstants.DEFAULT_HOST
      static int DEFAULT_PORT
      The default value for the port property, initialised for an Engine, see ConnectionConstants.DEFAULT_PORT.
      static java.lang.String DEFAULT_PROCESS_NAME
      The default value for the process name, initialised for an Engine, see ConnectionConstants.DEFAULT_PROCESS_NAME.
      static java.lang.String PRODUCTNAME
      The name of the product - this is just one component of the name that the user sees.
      static java.lang.String PROPERTY_BEAN_CONNECTED
      The string name of the bound property that is used for "beanConnected" updates (typically "beanConnected", but this constant should be used to be sure).
      static java.lang.String PROPERTY_CONNECTION_POLLING_INTERVAL
      The string name of the bound property that is used for "connectionPollingInterval" updates (typically "connectionPollingInterval", but this constant should be used to be sure).
      static java.lang.String PROPERTY_HOST
      The string name of the bound property that is used for "host" updates (typically "host", but this constant should be used to be sure).
      static java.lang.String PROPERTY_PORT
      The string name of the bound property that is used for "port" updates (typically "port", but this constant should be used to be sure).
      static java.lang.String PROPERTY_PROCESS_NAME
      The string name of the bound property that is used for "processName" updates (typically "processName", but this constant should be used to be sure).
      static java.lang.String PROPERTY_VERBOSE
      The string name of the bound property that is used for "verbose" updates (typically "verbose", but this constant should be used to be sure).
      static java.lang.String VERSION
      The marketing version number for the product as a whole.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Add a property change listener.
      void addPropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Add a property change listener for a specific named property.
      void close()
      Disconnects the client and also waits to ensure that all background threads and other resources associated with this object have been terminated or freed.
      void connectNow()
      Manually request that the bean connects to the remote server.
      void disconnect()
      Disconnect from a server.
      void dispose()
      Deprecated.
      Replaced by close() as of Apama version 9.10
      boolean getBeanConnected()
      Get the beanConnected property value.
      int getConnectionPollingInterval()
      Get the polling interval (in milliseconds) for the internal connection test thread.
      java.lang.String getHost()
      Get the name of the host to be connected to.
      int getPort()
      Get the port number to be connected to.
      java.lang.String getProcessName()
      Get the process name of this client This is the process name used when initialising the client
      boolean isBeanConnected()
      Another name for the getBeanConnected() method.
      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Remove a property change listener.
      void removePropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Remove a property change listener for a specific named property.
      void setConnectionPollingInterval​(int milliseconds)
      Set the polling interval (in milliseconds) for the internal connection test thread.
      void setHost​(java.lang.String newHostValue)
      Setter for the host property.
      void setPort​(int newPortValue)
      Setter for the port property.
      void setProcessName​(java.lang.String newProcessName)
      Setter for the process name property.
    • Field Detail

      • VERSION

        static final java.lang.String VERSION
        The marketing version number for the product as a whole.
        See Also:
        Constant Field Values
      • PRODUCTNAME

        static final java.lang.String PRODUCTNAME
        The name of the product - this is just one component of the name that the user sees.
        See Also:
        Constant Field Values
      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The copyright statement that is displayed in the usage string of a number of components.
        See Also:
        Constant Field Values
      • DEFAULT_CONNECTION_POLLING_INTERVAL

        static final int DEFAULT_CONNECTION_POLLING_INTERVAL
        The default value for the connectionPollingInterval property in milliseconds.
        See Also:
        Constant Field Values
      • PROPERTY_HOST

        static final java.lang.String PROPERTY_HOST
        The string name of the bound property that is used for "host" updates (typically "host", but this constant should be used to be sure).
        See Also:
        Constant Field Values
      • PROPERTY_PORT

        static final java.lang.String PROPERTY_PORT
        The string name of the bound property that is used for "port" updates (typically "port", but this constant should be used to be sure).
        See Also:
        Constant Field Values
      • PROPERTY_PROCESS_NAME

        static final java.lang.String PROPERTY_PROCESS_NAME
        The string name of the bound property that is used for "processName" updates (typically "processName", but this constant should be used to be sure).
        See Also:
        Constant Field Values
      • PROPERTY_BEAN_CONNECTED

        static final java.lang.String PROPERTY_BEAN_CONNECTED
        The string name of the bound property that is used for "beanConnected" updates (typically "beanConnected", but this constant should be used to be sure).
        See Also:
        Constant Field Values
      • PROPERTY_CONNECTION_POLLING_INTERVAL

        static final java.lang.String PROPERTY_CONNECTION_POLLING_INTERVAL
        The string name of the bound property that is used for "connectionPollingInterval" updates (typically "connectionPollingInterval", but this constant should be used to be sure).
        See Also:
        Constant Field Values
      • PROPERTY_VERBOSE

        static final java.lang.String PROPERTY_VERBOSE
        The string name of the bound property that is used for "verbose" updates (typically "verbose", but this constant should be used to be sure).
        See Also:
        Constant Field Values
    • Method Detail

      • connectNow

        void connectNow()
                 throws com.apama.util.CompoundException
        Manually request that the bean connects to the remote server. Repeated calls are permitted, and attempting to connect a bean that is already connected is identical to calling pingServer() from the PingOperationsInterface.
        Throws:
        com.apama.util.CompoundException - Thrown if any exceptions occur in the Client SDK.
      • disconnect

        void disconnect()
                 throws com.apama.util.CompoundException
        Disconnect from a server. Removes the reference to the underlying RPC object, and unhooks the ShutdownHook.

        The beanConnected property is set to false, and the connection polling thread is terminated.

        Throws:
        com.apama.util.CompoundException - When there was a problem during the disconnection. Some implementations use a subclass of CompoundException.
      • close

        void close()
        Disconnects the client and also waits to ensure that all background threads and other resources associated with this object have been terminated or freed. This method should always be called before quitting the program. Never call this method while the target object is locked, or from a thread that is receiving events or handling a property change notification event from the target object.

        This method is invoked automatically on objects managed by the try-with-resources statement.

        Specified by:
        close in interface java.lang.AutoCloseable
        See Also:
        AutoCloseable.close()
      • dispose

        @Deprecated
        void dispose()
        Deprecated.
        Replaced by close() as of Apama version 9.10
        Disconnects the client and also waits to ensure that all background threads and other resources associated with this object have been terminated or freed. This method should always be called before quitting the program. Never call this method while the target object is locked, or from a thread that is receiving events or handling a property change notification event from the target object.
      • getHost

        java.lang.String getHost()
        Get the name of the host to be connected to. This is the name of the host on which the server to be monitored is running.
        Returns:
        Name of the host where the server to be monitored is running.
      • setHost

        void setHost​(java.lang.String newHostValue)
              throws com.apama.util.CompoundException
        Setter for the host property. This is the name of the host on which the server to be monitored is running. Changing this property will cause any existing connection to be lost. If there was an existing connection, then a new connection will be created.
        Parameters:
        newHostValue - The new value for the Host property.
        Throws:
        com.apama.util.CompoundException - Thrown if any exceptions occur in the Client SDK.
      • getPort

        int getPort()
        Get the port number to be connected to. This is the port number on which the server to be monitored is listening.
        Returns:
        Port number on which the server to be monitored is listening.
      • setPort

        void setPort​(int newPortValue)
              throws com.apama.util.CompoundException
        Setter for the port property. This is the port number on which the server to be monitored is listening. Changing this property will cause any existing connection to be lost. If there was an existing connection, then a new connection will be created.
        Parameters:
        newPortValue - The new value for the Port property.
        Throws:
        com.apama.util.CompoundException - Thrown if any exceptions occur in the Client SDK.
      • getProcessName

        java.lang.String getProcessName()
        Get the process name of this client This is the process name used when initialising the client
        Returns:
        ProcessName the process name in use
      • setProcessName

        void setProcessName​(java.lang.String newProcessName)
                     throws com.apama.util.CompoundException
        Setter for the process name property. This is the process name the client will use. Changing this property will cause any existing connection to be lost. If there was an existing connection, then a new connection will be created.
        Parameters:
        newProcessName - The new value for the Process Name
        Throws:
        com.apama.util.CompoundException - Thrown if any exceptions occur in the Client SDK.
      • isBeanConnected

        boolean isBeanConnected()
        Another name for the getBeanConnected() method.
        Returns:
        true if the bean has a connection to a server, false if not.
      • getBeanConnected

        boolean getBeanConnected()
        Get the beanConnected property value. This is the status of the bean - connected, or not connected. It indicates if the Bean has a valid instance of the underlying RPC interface.
        Returns:
        true if the bean has a connection to a server, false if not.
      • getConnectionPollingInterval

        int getConnectionPollingInterval()
        Get the polling interval (in milliseconds) for the internal connection test thread.
        Returns:
        the current interval in milliseconds
      • setConnectionPollingInterval

        void setConnectionPollingInterval​(int milliseconds)
        Set the polling interval (in milliseconds) for the internal connection test thread. If the parameter is negative, then the default value will be used instead.
        Parameters:
        milliseconds - the polling interval in milliseconds
      • removePropertyChangeListener

        void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
        Remove a property change listener.
        Parameters:
        listener - the listener to be removed.
      • removePropertyChangeListener

        void removePropertyChangeListener​(java.lang.String propertyName,
                                          java.beans.PropertyChangeListener listener)
        Remove a property change listener for a specific named property.
        Parameters:
        propertyName - the name of the property that was listened on.
        listener - the listener to be removed.
      • addPropertyChangeListener

        void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
        Add a property change listener. Use this method to be informed whenever the a property value is changed.
        Parameters:
        listener - the listener to be added.
      • addPropertyChangeListener

        void addPropertyChangeListener​(java.lang.String propertyName,
                                       java.beans.PropertyChangeListener listener)
        Add a property change listener for a specific named property.
        Parameters:
        propertyName - the name of the property to listen on.
        listener - the listener to be added.