public interface AdapterRegistry
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> });
Modifier and Type | Method and Description |
---|---|
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.
|
void registerAdapter(String adapterNamespace, String adapterName, AdapterCapability[] capabilities, AdapterCallback[] callbacks) throws AdapterAlreadyRegisteredException, AdapterCapabilityMismatchException, AdapterCallbackUnknownException, AdapterCallbackDuplicateException
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.
adapterNamespace
- the adapter's namespaceadapterName
- the adapter's name (or type)capabilities
- an array of AdapterCapability
constants
describing the capabilities supported by the adaptercallbacks
- the adapter callbacks to be registeredAdapterAlreadyRegisteredException
- if the adapter is already registeredAdapterCallbackUnknownException
- if any of the supplied
AdapterCallback
instances implements an interface/callback
unknown to the Adapter FrameworkAdapterCapabilityMismatchException
- if the specified capabilities do
not match the supplied callbacks or vide versaAdapterCallbackDuplicateException
- if any callback interface is
provided more than once in the callbacks arrayAdapterCallback
,
AdapterCapability
void unregisterAdapter(String adapterNamespace, String adapterName) throws AdapterNotRegisteredException
adapterNamespace
- the adapter's namespaceadapterName
- the adapter's name (or type)AdapterNotRegisteredException
- if the adapter was not registered
using registerAdapter
prior to invoking this methodAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] SAP_XIAF
|
[sap.com] com.sap.aii.af.svc.facade
|
api
|
BC-XI
|
Copyright 2019 SAP AG Complete Copyright Notice