com.sap.aii.af.service.administration.api.cpa

Interface CPAInboundRuntimeLookupManager

All Known Subinterfaces:
CPAOutboundRuntimeLookupManager

public interface CPAInboundRuntimeLookupManager

The CPA cache service offers two kinds of lookup mechanisms. One is offered for such adapters, which need to start an own instance, for each Channel configuration. Such adapters use the LookupManager singleton class to read all known Channel configurations for their own adapter type from the cache at startup, to start an instance of the adapter for each Channel. These adapter types should also register themselves to the CallbackController, in order to be informed about new and deleted Channel configurations.

The other type of adapters has only one running instance, which can handle all messages, Channel-independent. These adapters need to retrieve the Channel configuration per Message at runtime, based on the addressing information in the header of the currently processed message. The InboundRuntimeLookup and InboundRuntimeLookup objects allow to retrieve Channel attribute values by checking internally, if a matching Binding (sender or receiver agreement) exists. The adapter type/namespace and the given addressing data of the message (from/to Party/Service and Interface[Namespace]) need to be passed into the constructor. After constuction the Inbound/OutboundRuntimeLookup either the Channel object can be retrieved for further processing, or the configuration values can be retrieved directly by name, as defined in the adapter type meta data (schema).


Example of usage:

 InboundRuntimeLookup lookup = new InboundRuntimeLookup("MyAdapterName",
                "http://mycompany.com/myadapter/namespace", "fromParty", "toParty",
                "fromService", "toService", "interface", "interfaceNamespace");
 
 int value = lookup.getChannelValueAsInt("IntValueName");
 

See Also:
OutboundRuntimeLookup, LookupManager

Method Summary
 Binding getBinding()
          Returns the inbound Binding object for the message header fields, given in the constuctor.
 Object getBindingValue(String valueName)
          Returns the Binding attribute value for the given name as Object.
 BinaryData getBindingValueAsBinary(String valueName)
          Returns the Binding attribute value for the given name as BinaryData.
 boolean getBindingValueAsBoolean(String valueName)
          Returns the Binding attribute value for the given name as Boolean.
 int getBindingValueAsInt(String valueName)
          Returns the Binding attribute value for the given name as Integer.
 long getBindingValueAsLong(String valueName)
          Returns the Binding attribute value for the given name as Long.
 String getBindingValueAsString(String valueName)
          Returns the Binding attribute value for the given name as String.
 TableData getBindingValueAsTable(String valueName)
          Returns the Binding attribute value for the given name as TableData.
 Channel getChannel()
          Returns the Channel object for the given Binding.
 Channel getChannelObject(Binding binding)
           
 Object getChannelValue(String valueName)
          Returns the Channel attribute value for the given name as Object.
 BinaryData getChannelValueAsBinary(String valueName)
          Returns the Channel attribute value for the given name as BinaryData.
 boolean getChannelValueAsBoolean(String valueName)
          Returns the Channel attribute value for the given name as Boolean.
 int getChannelValueAsInt(String valueName)
          Returns the Channel attribute value for the given name as Integer.
 long getChannelValueAsLong(String valueName)
          Returns the Channel attribute value for the given name as Long.
 String getChannelValueAsString(String valueName)
          Returns the Channel attribute value for the given name as String.
 TableData getChannelValueAsTable(String valueName)
          Returns the Channel attribute value for the given name as TableData.
 Binding getInboundBinding()
           
 Binding getInboundBinding(boolean ignore)
          Depending on the CacheManager initialization, this method returns the Binding object as configured in the constructor, either from the memory cache, or directly from the database.
 Binding getOutboundBinding()
           
 Binding getOutboundBinding(boolean ignore)
          Depending on the CacheManager initialization, this method returns the Binding object as configured in the constructor, either from the memory cache, or directly from the database.
 boolean isBindingValuePassword(String valueName)
          Returns if a given Binding attribute value is a password field, or not.
 boolean isChannelValuePassword(String valueName)
          Returns if a given Channel attribute value is a password field, or not.
 

Method Detail

getChannelValue

Object getChannelValue(String valueName)
                       throws CPAException
Returns the Channel attribute value for the given name as Object.

Returns:
The retrieved Channel attribute value for the given name as Object.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsString

String getChannelValueAsString(String valueName)
                               throws CPAException
Returns the Channel attribute value for the given name as String.

Returns:
The retrieved Channel attribute value for the given name as String.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsInt

int getChannelValueAsInt(String valueName)
                         throws CPAException
Returns the Channel attribute value for the given name as Integer.

Returns:
The retrieved Channel attribute value for the given name as Integer.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsLong

long getChannelValueAsLong(String valueName)
                           throws CPAException
Returns the Channel attribute value for the given name as Long.

Returns:
The retrieved Channel attribute value for the given name as Long.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsBoolean

boolean getChannelValueAsBoolean(String valueName)
                                 throws CPAException
Returns the Channel attribute value for the given name as Boolean.

Returns:
The retrieved Channel attribute value for the given name as Boolean.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsBinary

BinaryData getChannelValueAsBinary(String valueName)
                                   throws CPAException
Returns the Channel attribute value for the given name as BinaryData.

Returns:
The retrieved Channel attribute value for the given name as BinaryData.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getChannelValueAsTable

TableData getChannelValueAsTable(String valueName)
                                 throws CPAException
Returns the Channel attribute value for the given name as TableData.

Returns:
The retrieved Channel attribute value for the given name as TableData.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

getBindingValue

Object getBindingValue(String valueName)
                       throws CPAException
Returns the Binding attribute value for the given name as Object.

Returns:
The retrieved Binding attribute value for the given name as Object.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsString

String getBindingValueAsString(String valueName)
                               throws CPAException
Returns the Binding attribute value for the given name as String.

Returns:
The retrieved Binding attribute value for the given name as String.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsInt

int getBindingValueAsInt(String valueName)
                         throws CPAException
Returns the Binding attribute value for the given name as Integer.

Returns:
The retrieved Binding attribute value for the given name as Integer.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsLong

long getBindingValueAsLong(String valueName)
                           throws CPAException
Returns the Binding attribute value for the given name as Long.

Returns:
The retrieved Binding attribute value for the given name as Long.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsBoolean

boolean getBindingValueAsBoolean(String valueName)
                                 throws CPAException
Returns the Binding attribute value for the given name as Boolean.

Returns:
The retrieved Binding attribute value for the given name as Boolean.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsBinary

BinaryData getBindingValueAsBinary(String valueName)
                                   throws CPAException
Returns the Binding attribute value for the given name as BinaryData.

Returns:
The retrieved Binding attribute value for the given name as BinaryData.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBindingValueAsTable

TableData getBindingValueAsTable(String valueName)
                                 throws CPAException
Returns the Binding attribute value for the given name as TableData.

Returns:
The retrieved Binding attribute value for the given name as TableData.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getBinding

Binding getBinding()
                   throws CPAException
Returns the inbound Binding object for the message header fields, given in the constuctor.

Returns:
The retrieved inbound Binding object.
Throws:
CPAException - in case that no inbound Binding can be retrieved.
CPAException

getChannel

Channel getChannel()
                   throws CPAException
Returns the Channel object for the given Binding.

Returns:
The retrieved Channel object for the given Binding.
Throws:
CPAException - in case that no such Channel can be retrieved.
CPAException

isChannelValuePassword

boolean isChannelValuePassword(String valueName)
                               throws CPAException
Returns if a given Channel attribute value is a password field, or not. This method makes only sense for String data fields. In case of non-String fields, it will return false.

Returns:
If the given String Channel attribute value is a password field, or not.
Throws:
CPAException - in case that no such Channel attribute can be retrieved.
CPAException

isBindingValuePassword

boolean isBindingValuePassword(String valueName)
                               throws CPAException
Returns if a given Binding attribute value is a password field, or not. This method makes only sense for String data fields. In case of non-String fields, it will return false.

Returns:
If the given String Binding attribute value is a password field, or not.
Throws:
CPAException - in case that no such Binding attribute can be retrieved.
CPAException

getChannelObject

Channel getChannelObject(Binding binding)
                         throws CPAException
Throws:
CPAException

getInboundBinding

Binding getInboundBinding()
                          throws CPAException
Throws:
CPAException

getInboundBinding

Binding getInboundBinding(boolean ignore)
                          throws CPAException
Depending on the CacheManager initialization, this method returns the Binding object as configured in the constructor, either from the memory cache, or directly from the database. Internally it uses the getMostSpecific method provided by the aii_util_misc package.

Parameters:
ignore - If this flag is true, the method will return null, if no binding is configured, instead of throwing an exception.
Returns:
the best fitting Binding object as configured in the constructor.
Throws:
CPALookupException - in case that no such Binding object can be retrieved.
CPAException

getOutboundBinding

Binding getOutboundBinding()
                           throws CPAException
Throws:
CPAException

getOutboundBinding

Binding getOutboundBinding(boolean ignore)
                           throws CPAException
Depending on the CacheManager initialization, this method returns the Binding object as configured in the constructor, either from the memory cache, or directly from the database. Internally it uses the getMostSpecific method provided by the aii_util_misc package.

Parameters:
ignore - If this flag is true, the method will return null, if no binding is configured, instead of throwing an exception.
Returns:
the Binding object as configured in the constructor.
Throws:
CPALookupException - in case that no such Binding object can be retrieved.
CPAException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] SAP_XIAF [sap.com] com.sap.aii.af.svc.facade api BC-XI


Copyright 2011 SAP AG Complete Copyright Notice