com.ibm.broker.config.proxy

Class IntegrationNodeConnectionParameters

  • java.lang.Object
    • com.ibm.broker.config.proxy.IntegrationNodeConnectionParameters
  • All Implemented Interfaces:
    BrokerConnectionParameters
    Direct Known Subclasses:
    MQBrokerConnectionParameters, MQPropertyFileBrokerConnectionParameters


    public class IntegrationNodeConnectionParameters
    extends java.lang.Object
    implements BrokerConnectionParameters
    Provides the connection parameters to a remote integration node by directly specifying its IP connection parameters.

    Applications should create an instance of this class to connect to an integration node using its hostname and web administration port. In order to attempt a connection, the instance must then be passed to the BrokerProxy.getInstance method. For example:

         BrokerProxy.getInstance(
             new IntegrationNodeConnectionParameters(
                 "mymachine.domain.com", 4414));
     
    Note that once the getInstance() method has been called, modifying the IntegrationNodeConnectionParameters object will have no effect on existing connections.

    To connect to an integration node defined on the local machine, it is recommended that you use BrokerProxy.getLocalInstance instead.

    class com.ibm.broker.config.proxy.IntegrationNodeConnectionParameters implements com.ibm.broker.config.proxy.BrokerConnectionParameters

    Responsibilities Represents a set of IP connection parameters to an integration node.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IntegrationNodeConnectionParameters(java.lang.String filename)
      Constructs a new instance that refers to connection properties in the file with the supplied fully qualified name.
      IntegrationNodeConnectionParameters(java.lang.String ip, int port)
      Takes the parameters required to make an IP-based connection to an integration node.
      IntegrationNodeConnectionParameters(java.lang.String ip, int port, java.lang.String userName, java.lang.String password, boolean useSSL)
      Takes the parameters required to make an IP-based connection to an integration node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getBrokerName()
      Returns the name of the integration node
      java.lang.String getHostname()
      Returns the IP address or hostname of the integration node as stored in the properties file.
      java.lang.String getIp()
      Returns the IP address or hostname of the integration node
      int getPort()
      Returns the port used by the web admin listener that is started by the integration node
      com.ibm.broker.config.proxy.CommsMessageSerializer getProtocol()
      This method is required by the IBM Integration API (CMP) and should not be called by user applications.
      java.lang.String getQueueManager() 
      com.ibm.broker.config.proxy.Receiver getReceiver()
      This method is required by the IBM Integration API (CMP) and should not be called by user applications.
      com.ibm.broker.config.proxy.Sender getSender()
      This method is required by the IBM Integration API (CMP) and should not be called by user applications.
      java.lang.String getSessionIDString()
      Returns a String representation of the session Id for this connection to the broker.
      java.lang.String getUserID()
      Returns the user ID to be used for administration security credentials.
      boolean isLocal() 
      boolean isPasswordSet() 
      void setAdvancedConnectionParameters(int maxRetries, int retryWaitMillis)
      Sets advanced options for a connection to the Integration Node.
      void setPassword(java.lang.String password) 
      void setUserID(java.lang.String userName) 
      java.lang.String toString()
      For diagnostic information, this method displays the current connection parameters.
      boolean useSIS() 
      void validate(BrokerProxy proxy)
      This method is required by the IBM Integration API (CMP) and should not be called by user applications.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IntegrationNodeConnectionParameters

        public IntegrationNodeConnectionParameters(java.lang.String ip,
                                                   int port)
        Takes the parameters required to make an IP-based connection to an integration node. Upon returning from this method, the supplied data will not have been validated and a connection to a broker will not have been established. All this work takes place during the call to BrokerProxy.getInstance().
        Parameters:
        ip - IP Address of the target integration node.
        port - Web admin port of the target integration node.
      • IntegrationNodeConnectionParameters

        public IntegrationNodeConnectionParameters(java.lang.String ip,
                                                   int port,
                                                   java.lang.String userName,
                                                   java.lang.String password,
                                                   boolean useSSL)
        Takes the parameters required to make an IP-based connection to an integration node. Upon returning from this method, the supplied data will not have been validated and a connection to a broker will not have been established. All this work takes place during the call to BrokerProxy.getInstance().
        Parameters:
        ip - IP Address of the target integration node.
        port - Web admin port of the target integration node.
        userName - User name defined to the remote integration node (this is a web user account)
        password - password for User name.
        useSSL - Connect to the remote integration node using SSL connectivity.
      • IntegrationNodeConnectionParameters

        public IntegrationNodeConnectionParameters(java.lang.String filename)
        Constructs a new instance that refers to connection properties in the file with the supplied fully qualified name. If the file cannot be read for whatever reason, the call to BrokerProxy.getInstance() will throw a ConfigManagerProxyLoggedException.
        Parameters:
        filename - Path and file name of the parameter file, which must be in the *.broker format. Supplying a null or blank parameter here has the same effect as calling the empty constructor.
    • Method Detail

      • getQueueManager

        public java.lang.String getQueueManager()
      • getIp

        public java.lang.String getIp()
        Returns the IP address or hostname of the integration node
        Returns:
        String hostname
      • getHostname

        public java.lang.String getHostname()
        Returns the IP address or hostname of the integration node as stored in the properties file.
        Returns:
        String hostname
      • getPort

        public int getPort()
        Returns the port used by the web admin listener that is started by the integration node
        Returns:
        String port
      • isLocal

        public boolean isLocal()
      • getBrokerName

        public java.lang.String getBrokerName()
        Returns the name of the integration node
        Returns:
        String name
      • setAdvancedConnectionParameters

        public void setAdvancedConnectionParameters(int maxRetries,
                                                    int retryWaitMillis)
        Sets advanced options for a connection to the Integration Node.
        Parameters:
        maxRetries - The number of times the IBM Integration API (CMP) should retry sending messages after consecutive failures. If this is set to -1, the existing value will be used.
        retryWaitMillis - The time (in milliseconds) the IBM Integration API (CMP) should wait inbetween retries. If this is set to -1, the existing value will be used.
      • getProtocol

        public com.ibm.broker.config.proxy.CommsMessageSerializer getProtocol()
        This method is required by the IBM Integration API (CMP) and should not be called by user applications. Returns an instance of the wire protocol associated with this connection.
        Specified by:
        getProtocol in interface BrokerConnectionParameters
        Returns:
        CommsMessageSerializer an object capable of turning Comms Messages into byte streams.
      • getUserID

        public java.lang.String getUserID()
        Returns the user ID to be used for administration security credentials.
        Specified by:
        getUserID in interface BrokerConnectionParameters
        Returns:
        String the user ID associated with the connection.
      • setUserID

        public void setUserID(java.lang.String userName)
      • setPassword

        public void setPassword(java.lang.String password)
      • isPasswordSet

        public boolean isPasswordSet()
      • useSIS

        public boolean useSIS()
      • getSessionIDString

        public java.lang.String getSessionIDString()
        Returns a String representation of the session Id for this connection to the broker.
        Returns:
        String representation of the session Id.
      • toString

        public java.lang.String toString()
        For diagnostic information, this method displays the current connection parameters.
        Overrides:
        toString in class java.lang.Object