com.ibm.broker.config.proxy

Class ConfigurableService

  • java.lang.Object
    • com.ibm.broker.config.proxy.ConfigurableService


  • public class ConfigurableService
    extends java.lang.Object
    Describes a configurable service definition on a broker.

    Instances are generated on demand from BrokerProxy.getConfigurableServices() and are not modified by the IBM Integration API (CMP) once they have been instantiated. If the configurable service or any of its properties are subsquently modified on the broker, change notifications will only be sent to AdministeredObjectListeners of the BrokerProxy, and the ConfigurableService object will contain out-of-date information. At this point the affected ConfigurableService object should be reobtained using the BrokerProxy.getConfigurableService() or BrokerProxy.getConfigurableServices() methods:

    Given that 'b' is a connected BrokerProxy instance, then to return all configurable services on that broker:

    ConfigurableService[] services = b.getConfigurableServices(null);
    To return all configurable services of a given type:
    ConfigurableService[] jmsProviders = b.getConfigurableServices("JMSProviders");
    To return a named configurable service:
    ConfigurableService myJMSProvider = b.getConfigurableService("EISProviders", "JMS1");
    To list all the configurable service types on the broker:
    String[] types = b.getConfigurableServiceTypes();
    Use BrokerProxy.createConfigurableService() to define a new configurable service on the broker.

    com.ibm.broker.config.proxy.ConfigurableService

    Responsibilities Represents a configurable service.
    Internal Collaborators com.ibm.broker.config.proxy.BrokerProxy
    
     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
     51619.46 2009-04-24  HDMPL           v7 Release
     80006    2011-05-13  HDCAB           v8 release:                                        
                                             Added equals() method.
     
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void delete()
      Asks the broker to delete the configurable service.
      void deleteProperties(java.lang.String[] csPropertyNames)
      Asks the broker to delete multiple configurable service properties in a single request to the broker.
      void deleteProperty(java.lang.String csPropertyName)
      Asks the broker to delete a configurable service property of the supplied name to the supplied value.
      boolean equals(java.lang.Object obj)
      Compares this ConfigurableServoce with the Object passed in.
      java.lang.String getName()
      Returns the name of the configurable service.
      java.util.Properties getProperties()
      Returns the properties associated with the configurable service that were active at the time BrokerProxy.getConfigurableServices() was called.
      java.lang.String getType()
      Returns the type of the configurable service.
      void setProperties(java.util.Properties csProperties)
      Asks the broker to set multiple configurable service properties in a single request to the broker.
      void setProperty(java.lang.String csPropertyName, java.lang.String csPropertyValue)
      Asks the broker to set a configurable service property of the supplied name to the supplied value.
      java.lang.String toString()
      Returns a String representation of the ConfigurableService.
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the configurable service.
        Returns:
        String Name
      • getType

        public java.lang.String getType()
        Returns the type of the configurable service.
        Returns:
        String Type
      • getProperties

        public java.util.Properties getProperties()
        Returns the properties associated with the configurable service that were active at the time BrokerProxy.getConfigurableServices() was called. Any changes to the returned Properties object will not be sent as property change requests to the broker runtime. To modify configurable service properties, use ConfigurableService.setProperty(String, String).
        Returns:
        Properties a new Properties object that contains the key/value pairs associated with this configurable service.
      • setProperty

        public void setProperty(java.lang.String csPropertyName,
                                java.lang.String csPropertyValue)
                         throws ConfigManagerProxyLoggedException
        Asks the broker to set a configurable service property of the supplied name to the supplied value.
        Parameters:
        csPropertyName - Name of the property to set. This should be equal to a key from the Properties object returned from getProperties(). The range of valid values depends on the type of the configurable service being modified. For example, "MaximumConnections" is a valid property for Configurable Services of the "TCPIPClient" type.
        csPropertyValue - The new value to assign to the property, for example "100".
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • deleteProperty

        public void deleteProperty(java.lang.String csPropertyName)
                            throws ConfigManagerProxyLoggedException
        Asks the broker to delete a configurable service property of the supplied name to the supplied value.
        Parameters:
        csPropertyName - Name of the property to delete. This should be equal to a key from the Properties object returned from getProperties(). Only properties of a UserDefined type can be deleted.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setProperties

        public void setProperties(java.util.Properties csProperties)
                           throws ConfigManagerProxyLoggedException
        Asks the broker to set multiple configurable service properties in a single request to the broker. Each key/value pair of the supplied Properties object must be a property name and value that can be set on the current configurable service, using the same format as expected by the ConfigurableService.setProperty() method.
        Parameters:
        csProperties - Object containing the key/value pairs of properties to set.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • deleteProperties

        public void deleteProperties(java.lang.String[] csPropertyNames)
                              throws ConfigManagerProxyLoggedException
        Asks the broker to delete multiple configurable service properties in a single request to the broker. Each value of the supplied array must be a property name that can be deleted on the current configurable service.
        Parameters:
        csPropertyNames - array containing the names of properties to delete.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • toString

        public java.lang.String toString()
        Returns a String representation of the ConfigurableService.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Compares this ConfigurableServoce with the Object passed in.

        Two instances of a ConfigurableService are equal if and only if they are both ConfigurableServices and they have the same name and type.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - - the object that is to be compared with this one.
        Returns:
        true if the two Configurable objects are equal