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.xds
Class XDSHeartbeatDocument

    java.lang.Object
      com.novell.nds.dirxml.driver.xds.DocumentImpl
          com.novell.nds.dirxml.driver.xds.XDSHeartbeatDocument

All Implemented Interfaces:
  StatusDocument, WriteableDocument, XDSDocument

public class XDSHeartbeatDocument
extends DocumentImpl
implements WriteableDocument, StatusDocument

A specific instance of the `XmlDocument` passed to method `execute(XmlDocument, XmlQueryProcessor)` of interface `XmlCommandProcessor`.

A heartbeat document is periodically sent on the publisher channel to facilitate driver health monitoring.

An `XmlCommandProcessor` object reference is passed to the `PublicationShim.start(XmlCommandProcessor)` method.

Constructor Summary
`XDSHeartbeatDocument()` Constructs a populated heartbeat document.
`XDSHeartbeatDocument(DTDVersion dtdVersion)` Constructs a populated heartbeat document.

Method Summary
`XDSSourceElement` | `appendSourceElement()` Appends an empty, child `<source>` element to this document's `<nds>` element.
`XDSStatusElement` | `appendStatusElement()` Appends an empty, child `<status>` element to this document's `<input>` or `<output>` element.
`void` | `empty()` Removes all child nodes from this document's `<input>` or `<output>` element.
`com.novell.nds.dirxml.driver.XmlDocument` | `toXML()` Converts this document into an `XmlDocument`.
`void` | `validate()` Validates this document.

Methods inherited from class com.novell.nds.dirxml.driver.xds.DocumentImpl
`domDocument, domIOElement, domNDSElement, isEmpty`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.novell.nds.dirxml.driver.xds.XDSDocument
`domDocument, domIOElement, domNDSElement, isEmpty`

Constructor Detail

### XDSHeartbeatDocument

    public XDSHeartbeatDocument()

  Constructs a populated heartbeat document. The documument contains a single `<status>` element with a `type` attribute value of 'heartbeat'.

  This constructor should be used to build documents passed to the `execute` method of the `XmlCommandProcessor` object passed to the `start(XmlCommandProcessor)` of interface `PublicationShim`

See Also:
  `SkeletonPublicationShim.start(com.novell.nds.dirxml.driver.XmlCommandProcessor)`

### XDSHeartbeatDocument

    public XDSHeartbeatDocument(DTDVersion dtdVersion)

  Constructs a populated heartbeat document. The documument contains a single `<status>` element with a `type` attribute value of 'heartbeat'. The DTD version used is configurable.

  This constructor should be used to build documents passed to the `execute` method of the `XmlCommandProcessor` object passed to the `start(XmlCommandProcessor)` of interface `PublicationShim`

Parameters:
  `dtdVersion` - must not be `null`; must be >= 1.1
Throws:
  `IllegalArgumentException` - thrown if `dtdVersion` is `null` or < 1.1
See Also:
  `SkeletonPublicationShim.start(com.novell.nds.dirxml.driver.XmlCommandProcessor)`

Method Detail

### appendSourceElement

    public XDSSourceElement appendSourceElement()

  Description copied from interface: `WriteableDocument`
  Appends an empty, child `<source>` element to this document's `<nds>` element. When called more than once, no action is taken and the same `<source>` element is returned.

  Invocation Context:
    WRITE

  Specified by:
    `appendSourceElement` in interface `WriteableDocument`
  Returns:
    will not return `null`

### empty

    public void empty()

  Description copied from interface: `WriteableDocument`
  Removes all child nodes from this document's `<input>` or `<output>` element.

  Invocation Context:
    WRITE

  Specified by:
    `empty` in interface `WriteableDocument`

### validate

    public void validate()
                  throws XDSParseException

  Description copied from interface: `WriteableDocument`
  Validates this document.

  Invocation Context:
    WRITE

  Specified by:
    `validate` in interface `WriteableDocument`
  Throws:
    `XDSParseException` - if this document is malformed or invalid

### toXML

    public com.novell.nds.dirxml.driver.XmlDocument toXML()

  Description copied from interface: `WriteableDocument`
  Converts this document into an `XmlDocument`.

  Invocation Context:
    WRITE

  Specified by:
    `toXML` in interface `WriteableDocument`
  Returns:
    this document as a `XmlDocument`

### appendStatusElement

    public XDSStatusElement appendStatusElement()

  Description copied from interface: `StatusDocument`
  Appends an empty, child `<status>` element to this document's `<input>` or `<output>` element.

  Invocation Context:
    WRITE

  Specified by:
    `appendStatusElement` in interface `StatusDocument`
  Returns:
    will not return `null`

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