Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.driver
Interface DriverShim

    public interface DriverShim

The `DriverShim` interface defines the top-level interface through which the Identity Manager Engine initializes and communicates with an application shim.

A `DriverShim` implementation must provide a default constructor (a constructor which takes no parameters). The Identity Manager Engine calls the constructor through introspection on the `DriverShim` implementation's fully-qualified class name to create an instance of the shim.

There are two modes in which a `DriverShim` implementation will be operated: Normal Mode, and Get Schema Mode. In Normal Mode the following methods are called:

- `init`
- `getSubscriptionShim`
- `getPublicationShim`
- `shutdown`

In Get Schema Mode only the `getSchema` method is called.

A particular instance of a `DriverShim` implementation will only be used in one mode or the other, never both.

See Also:
  `SubscriptionShim`, `PublicationShim`

Method Summary
`PublicationShim` | `getPublicationShim()` The `getPublicationShim` method returns the shim's implementation of the `PublicationShim` interface.
`XmlDocument` | `getSchema(XmlDocument initParameters)` The `getSchema` method returns a representation of the application schema data.
`SubscriptionShim` | `getSubscriptionShim()` The `getSubscriptionShim` method returns the shim's implementation of the `SubscriptionShim` interface through which the Identity Manager Engine will submit commands to the shim.
`XmlDocument` | `init(XmlDocument initParameters)` The `init` method is the first method called in a `DriverShim` implementation.
`XmlDocument` | `shutdown(XmlDocument reason)` The `shutdown` method instructs the shim implementation to clean up all resources and shut down.

Method Detail

### init

    XmlDocument init(XmlDocument initParameters)

  The `init` method is the first method called in a `DriverShim` implementation. The purpose of the `init` method is to allow the implementation to perform any non-channel-specific initialization required.

  User-specified parameter values are passed in the `initParameters` document. See the Identity Manager SDK for information on the document format.

  The return from `init` is an XDS output document containing a <status> element indicating the result of initialization. A `null` return is allowed and is interpreted as success. A <status> element with a `level="error"` or `level="fatal"` XML attribute will cause the Engine to abort the shim initialization.

  Parameters:
    `initParameters` - XML document containing shim initialization parameters
  Returns:
    `null` or an XML document indicating the result of the initialization operation

### shutdown

    XmlDocument shutdown(XmlDocument reason)

  The `shutdown` method instructs the shim implementation to clean up all resources and shut down.

  In response to the `shutdown` call the shim implementation is responsible for instructing the publisher thread to return from `PublicationShim.start`.

  After `shutdown` is called no further shim methods will be called.

  The `reason` parameter is designed such the Identity Manager Engine can pass the reason that the shutdown is being initiated. However, at the time of this writing (Identity Manager 3.5) the Engine has always passed `null` rather than a document.

  The return from `shutdown` is an XDS output document containing a <status> element that indicates the result of the shutdown process. A `null` return is allowed and is interpreted as success.

  Parameters:
    `reason` - `null` or an XML document that may contain a description of the reason for shutdown
  Returns:
    `null` or an XML document containing the result of the shutting down
  See Also:
    `PublicationShim.start(com.novell.nds.dirxml.driver.XmlCommandProcessor)`

### getSubscriptionShim

    SubscriptionShim getSubscriptionShim()

  The `getSubscriptionShim` method returns the shim's implementation of the `SubscriptionShim` interface through which the Identity Manager Engine will submit commands to the shim.

  Returns:
    The shim's implementation of `SubscriptionShim` (never `null`)

### getPublicationShim

    PublicationShim getPublicationShim()

  The `getPublicationShim` method returns the shim's implementation of the `PublicationShim` interface. The methods of the returned interface will be called on the publisher thread (different from the thread that calls `getPublicationShim`).

  Returns:
    The shim's implementation of `PublicationShim` (never `null`)

### getSchema

    XmlDocument getSchema(XmlDocument initParameters)

  The `getSchema` method returns a representation of the application schema data.

  If this method is called none of the other methods of this interface will be called.

  Documentation describing the format of the data passed and returned is found in the Identity Manager SDK.

  Parameters:
    `initParameters` - XML document containing all of the shim initialization parameters (driver, subscriber, and publisher)
  Returns:
    an XML document containing the application schema data, or an error status return if no schema can be returned.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD