com.highdeal.hci
Class MessageSenderFactory

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

public abstract class MessageSenderFactory
extends java.lang.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.


Field Summary
protected  XMLMapping xmlMapping
          The mapping used by message senders created through this factory
 
Constructor Summary
MessageSenderFactory()
           
 
Method Summary
abstract  MessageSender createAdminMessageSender()
          Creates a new administration message sender for communications via HCI to the administration services of a dispatcher instance.
abstract  MessageSender createAdminMessageSender(java.lang.String instanceKey)
          Creates a new administration message sender connected to an instance of the distant SAP CC Core Server system.
abstract  MessageSender createMessageSender()
          Creates a new message sender that will first connect to the dispatcher instance of the system then to the updater instance.
abstract  MessageSender createSimpleMessageSender()
          Creates a new simple message sender without connecting to the distant SAP CC system.
abstract  void init(java.util.Properties prop)
          Initializes a MessageSenderFactory from a set of properties.
abstract  void init(java.net.URL... dipatcherUrl)
          Initializes a MessageSenderFactory from the URL of a dispatcher instance of the distant SAP CC system.
static MessageSenderFactory newInstance(java.util.Properties props)
          Creates a new instance of MessageSenderFactory using a set of properties.
 void setXMLMapping(XMLMapping mapping)
          Defines the XML mapping for the message senders created through this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlMapping

protected XMLMapping xmlMapping
The mapping used by message senders created through this factory

Constructor Detail

MessageSenderFactory

public MessageSenderFactory()
Method Detail

init

public abstract void init(java.util.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(java.net.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(java.lang.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(java.util.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:

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

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)