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

Interface AdapterRegistry


public interface AdapterRegistry

Provides an interface to register an adapter with the Adapter Framework. Information provided during the adapter registration include so-called adapter capabilities, which offer a means to announce certain adapter features (such as the support of push-based monitoring) to the Adapter Framework, as well as callbacks implemented by an adapter, which are invoked by the Adapter Framework on various occasions during the adapter's runtime.

An adapter must not register itself with the AdapterRegistry as well as the MonitorManager (which is superseded by the com.sap.aii.af.service.administration.api.* API) at the same time. Doing so will throw an AdapterAlreadyRegisteredException.

Important: Always unregister an adapter by invoking the unregisterAdapter method before the adapter terminates so that any object references within the Adapter Framework service pointing to the adapter can be freed.

An instance of this interface can be obtained using AdapterRegistryFactory.

Usage:

AdapterRegistryFactory.getInstance().getAdapterRegistry().
    registerAdapter(ADAPTER_NAMESPACE, ADAPTER_NAME, new AdapterCapability[] { <adapter capabilities> }, new AdapterCallback[] { <adapter callbacks> });

See Also:
AdapterRegistryFactory, AdapterCapability, AdapterCallback, AdapterAlreadyRegisteredException, com.sap.aii.af.service.monitor.api.MonitorManager

Method Summary
 com.sap.aii.af.service.administration.api.AdapterRegistration getAdapterRegistration(com.sap.aii.af.service.administration.monitoring.Adapter adapter)
          Gets the adapter registration from the adapter framework
 void registerAdapter(String adapterNamespace, String adapterName, AdapterCapability[] capabilities, AdapterCallback[] callbacks)
          Registers an adapter with the Adapter Framework.
 void unregisterAdapter(String adapterNamespace, String adapterName)
          Unregisters an adapter from the Adapter Framework.
 

Method Detail

registerAdapter

void registerAdapter(String adapterNamespace,
                     String adapterName,
                     AdapterCapability[] capabilities,
                     AdapterCallback[] callbacks)
                     throws AdapterAlreadyRegisteredException,
                            AdapterCapabilityMismatchException,
                            AdapterCallbackUnknownException,
                            AdapterCallbackDuplicateException
Registers an adapter with the Adapter Framework.

Information constituting the registration are a set of adapter capabilities as well as a set of callbacks into the adapter implementation. Examples of callbacks that can be registered are the ChannelLifecycleCallback as well as the LocalizationCallback interfaces.

Parameters:
adapterNamespace - the adapter's namespace
adapterName - the adapter's name (or type)
capabilities - an array of AdapterCapability constants describing the capabilities supported by the adapter
callbacks - the adapter callbacks to be registered
Throws:
AdapterAlreadyRegisteredException - if the adapter is already registered
AdapterCallbackUnknownException - if any of the supplied AdapterCallback instances implements an interface/callback unknown to the Adapter Framework
AdapterCapabilityMismatchException - if the specified capabilities do not match the supplied callbacks or vide versa
AdapterCallbackDuplicateException - if any callback interface is provided more than once in the callbacks array
See Also:
AdapterCallback, AdapterCapability

unregisterAdapter

void unregisterAdapter(String adapterNamespace,
                       String adapterName)
                       throws AdapterNotRegisteredException
Unregisters an adapter from the Adapter Framework.

Parameters:
adapterNamespace - the adapter's namespace
adapterName - the adapter's name (or type)
Throws:
AdapterNotRegisteredException - if the adapter was not registered using registerAdapter prior to invoking this method

getAdapterRegistration

com.sap.aii.af.service.administration.api.AdapterRegistration getAdapterRegistration(com.sap.aii.af.service.administration.monitoring.Adapter adapter)
Gets the adapter registration from the adapter framework

Parameters:
adapter - the adapter
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