Class MessageSenderFactory

java.lang.Object
com.highdeal.hci.MessageSenderFactory
Direct Known Subclasses:
HttpMessageSenderFactory

public abstract class MessageSenderFactory extends Object
This abstract Java class defines a factory API that enables your client applications (using the HCI technical interface) to create a message sender object; Consult the subclasses that extend this Java class.
  • Constructor Details

    • MessageSenderFactory

      public MessageSenderFactory()
  • Method Details

    • init

      public abstract void init(Properties prop) throws BadConfigurationException
      Initializes a MessageSenderFactory from a set of properties.
      Parameters:
      prop - The set of properties used to initialize this factory
      Throws:
      BadConfigurationException - when properties are not correct
    • init

      public abstract void init(URL... dipatcherUrl) throws BadConfigurationException
      Initializes a MessageSenderFactory from the URL of a dispatcher instance of the distant SAP CC system.
      Parameters:
      dipatcherUrl - The set of dispatcher URLs used to initialize this factory
      Throws:
      BadConfigurationException - when method parameters are not correct
    • createAdminMessageSender

      public abstract MessageSender createAdminMessageSender(String instanceKey)
      Creates a new administration message sender connected to an instance of the distant SAP CC Core Server system.
      Parameters:
      instanceKey - The identifier of the system instance which must be contacted
      Returns:
      A new message sender for administration services
    • createAdminMessageSender

      public abstract MessageSender createAdminMessageSender()
      Creates a new administration message sender for communications via HCI to the administration services of a dispatcher instance.
      Returns:
      A new message sender for administration services
    • createMessageSender

      public abstract MessageSender createMessageSender()
      Creates a new message sender that will first connect to the dispatcher instance of the system then to the updater instance.
      Returns:
      A new message sender
    • createSimpleMessageSender

      public abstract MessageSender createSimpleMessageSender()
      Creates a new simple message sender without connecting to the distant SAP CC system.
      Returns:
      A new simple message sender to be initialized (see init(java.util.Properties)
    • setXMLMapping

      public void setXMLMapping(XMLMapping mapping)
      Defines the XML mapping for the message senders created through this factory.
      Parameters:
      mapping - The XML mapping for the message senders created through this factory
    • newInstance

      public static MessageSenderFactory newInstance(Properties props) throws BadConfigurationException
      Creates a new instance of MessageSenderFactory using a set of properties.

      This set of properties must at least contains a property hci.sender_factory which must be the name of a subclass of MessageSenderFactory.

      The available message senders are: com.highdeal.hci.http.HttpMessageSenderFactory

      It can also contain the property hci.xml_mapping which must be the name of an implementation of XMLMapping.

      The available mapping classes are:

      • com.highdeal.pnr.hci.PnRXMLMapping
      • com.highdeal.components.generic.model.GenericComponentsXMLMapping
      • com.highdeal.components.advanced.model.AdvancedComponentsXMLMapping
      The set of properties is also passed to the init method of the created MessageSenderFactory.
      Parameters:
      props - A set of properties
      Returns:
      A new instance of MessageSenderFactory
      Throws:
      BadConfigurationException - when the set of properties contains bad configuration settings