com.mulesoft.adapter.ra
Class XIConfiguration

java.lang.Object
  extended by com.mulesoft.adapter.ra.XIConfiguration
All Implemented Interfaces:
com.sap.aii.af.service.administration.api.AdapterCallback, com.sap.aii.af.service.administration.api.cpa.ChannelLifecycleCallback, com.sap.aii.af.service.administration.api.i18n.LocalizationCallback, com.sap.aii.af.service.administration.api.monitoring.ChannelStatusCallback

public class XIConfiguration
extends Object
implements com.sap.aii.af.service.administration.api.cpa.ChannelLifecycleCallback, com.sap.aii.af.service.administration.api.monitoring.ChannelStatusCallback, com.sap.aii.af.service.administration.api.i18n.LocalizationCallback

Type: XIConfiguration Semantic: XIConfiguration manages all the XI channel information. During the start up phase all channels for this adapter are read by using the AF AAM and CPA API. During the run time this information is kept up-to-date by registering a call back method at the XI AAM service. Please note that this class was changed heavily from 3.0 SP16 to SP17: The CPA callback mechanism was replaced by the AAM machanism and the CPA managers are used from the AAM directly. (ra implementation specific)


Constructor Summary
XIConfiguration()
          Creates a XI configuration object.
XIConfiguration(String adapterType, String adapterNamespace)
          Creates a XI configuration object.
 
Method Summary
 void channelAdded(com.sap.aii.af.service.cpa.Channel channel)
           
 void channelRemoved(com.sap.aii.af.service.cpa.Channel channel)
           
 void channelUpdated(com.sap.aii.af.service.cpa.Channel channel)
           
 com.sap.aii.af.service.administration.api.monitoring.ChannelStatus getChannelStatus(com.sap.aii.af.service.cpa.Channel channel, Locale locale)
          The getChannelStatus() is called by the XI AF administration GUI's to visualize the channel status of adapters.
 LinkedList<com.sap.aii.af.service.cpa.Channel> getCopy(com.sap.aii.af.service.cpa.Direction direction)
          Get a copy of one of the channel lists for internal processings
 void init(SPIManagedConnectionFactory mcf)
          Initializes the inbound and outbound channel lists and takes care of the XI CPA callback registration.
 String localizeString(String str, Locale locale)
          The implementation of the LocalizationCallback allows the AAM to translate the channel and process status string at a later point in time into the locale of the browser that the user currently uses.
 void stop()
          Stops the automatic configuration update via CPA callback Remove the registration for PartyChangeCallBackHandlers, if any
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XIConfiguration

public XIConfiguration()
Creates a XI configuration object. Therefore the XI AAM LookupManager is instanciated. Use default adapter values


XIConfiguration

public XIConfiguration(String adapterType,
                       String adapterNamespace)
Creates a XI configuration object. Therefore the XI AAM LookupManager is instanciated.

Parameters:
adapterType - Adapter type as configured in the mcf property settings.
adapterNamespace - Namespace for this adapter type as configured in the mcf property settings.
Method Detail

channelAdded

public void channelAdded(com.sap.aii.af.service.cpa.Channel channel)
Specified by:
channelAdded in interface com.sap.aii.af.service.administration.api.cpa.ChannelLifecycleCallback
See Also:
com.sap.aii.af.service.administration.api.cpa#channelAdded(com.sap.aii.af.service.cpa.Channel)

channelUpdated

public void channelUpdated(com.sap.aii.af.service.cpa.Channel channel)
Specified by:
channelUpdated in interface com.sap.aii.af.service.administration.api.cpa.ChannelLifecycleCallback
See Also:
com.sap.aii.af.service.administration.api.cpa#channelUpdated(com.sap.aii.af.service.cpa.Channel)

channelRemoved

public void channelRemoved(com.sap.aii.af.service.cpa.Channel channel)
Specified by:
channelRemoved in interface com.sap.aii.af.service.administration.api.cpa.ChannelLifecycleCallback
See Also:
com.sap.aii.af.service.administration.api.cpa#channelRemoved(com.sap.aii.af.service.cpa.Channel)

init

public void init(SPIManagedConnectionFactory mcf)
          throws javax.resource.ResourceException
Initializes the inbound and outbound channel lists and takes care of the XI CPA callback registration.

Parameters:
mcf - MCF that has to be informed in case of channel updates
Throws:
javax.resource.ResourceException - if the CPA lookup or registration fails

stop

public void stop()
          throws javax.resource.ResourceException
Stops the automatic configuration update via CPA callback Remove the registration for PartyChangeCallBackHandlers, if any

Throws:
javax.resource.ResourceException

getCopy

public LinkedList<com.sap.aii.af.service.cpa.Channel> getCopy(com.sap.aii.af.service.cpa.Direction direction)
                                                       throws javax.resource.ResourceException
Get a copy of one of the channel lists for internal processings

Parameters:
direction - Determines whether inbound (sender) channels or outbound (receiver) channels will be returned
Throws:
javax.resource.ResourceException - if the direction is invalid

getChannelStatus

public com.sap.aii.af.service.administration.api.monitoring.ChannelStatus getChannelStatus(com.sap.aii.af.service.cpa.Channel channel,
                                                                                           Locale locale)
                                                                                    throws com.sap.aii.af.service.administration.api.monitoring.ChannelUnknownException
The getChannelStatus() is called by the XI AF administration GUI's to visualize the channel status of adapters. The adapter might also propagate processing status information with the AAM push method (using com.sap.aii.af.service.administration.api.monitoring.MonitoringManager). Channel status can also be reported actively (via the push mechansim) but getChannelStatus() and reportChannelStatus() are mutually exclusive. This sample here uses pull for channel status and push for process status. Starting with XI 3.0 SP17 the monitoring part was changed significantly since the previous com.sap.aii.af.service.monitor.api.AdapterMonitor did allow to collect unstructured status such as the status of the MCF, other sub-components and channels. With AAM, the channel and process status can be reported in a well-defined way that allows to provide general additional service on top, like alerting or localized status reports.

Specified by:
getChannelStatus in interface com.sap.aii.af.service.administration.api.monitoring.ChannelStatusCallback
Parameters:
channel: - The channel for which the status is reported
locale: - Localization of human readable strings
Returns:
ChannelStatus that describes the status of the channel (XI specific)
Throws:
com.sap.aii.af.service.administration.api.monitoring.ChannelUnknownException

localizeString

public String localizeString(String str,
                             Locale locale)
                      throws com.sap.aii.af.service.administration.api.i18n.LocalizationNotPossibleException
The implementation of the LocalizationCallback allows the AAM to translate the channel and process status string at a later point in time into the locale of the browser that the user currently uses. It is called for the the push status mechanism (In case of status pull the locale is set in the request and the adapter can return the translated text directly).

Specified by:
localizeString in interface com.sap.aii.af.service.administration.api.i18n.LocalizationCallback
Throws:
com.sap.aii.af.service.administration.api.i18n.LocalizationNotPossibleException
See Also:
LocalizationCallback.localizeString(java.lang.String, java.util.Locale)


Copyright © 2012. All Rights Reserved.