com.novell.nds.dirxml.driver.soap.util
Interface ByteArrayModifiers

All Superinterfaces:
Extension

public interface ByteArrayModifiers
extends Extension

Reads or modifies data in publisher and subscriber requests and responses. To implement this interface, you must implement the init() method from the Extension interface, as well as four additional methods that the driver shim calls at various points during data processing. Two of those points are on the subscriber channel, and two are on the publisher channel. All four methods receive a byte array and return a byte array. In general, if you need to only see the data and don't need to modify it, return the data parameter unmodified. If you want to deal with DOM Documents directly rather than use byte arrays, implement DocumentModifiers instead of this interface.

See Also:
DocumentModifiers

Method Summary
 byte[] modifyPublisherRequest(byte[] data)
          Processes all data received by the application on the publisher channel before the data is processed by the shim.
 byte[] modifyPublisherResponse(byte[] data)
          Processes the result (or response) of a publisher event before it is returned to the application.
 byte[] modifySubscriberRequest(byte[] data)
          Processes all data that is sent to the application on the subscriber channel.
 byte[] modifySubscriberResponse(byte[] data)
          Processes the result (or response) of a subscriber command before the shim returns the result to the engine.
 
Methods inherited from interface com.novell.nds.dirxml.driver.soap.util.Extension
init
 

Method Detail

modifyPublisherRequest

public byte[] modifyPublisherRequest(byte[] data)
Processes all data received by the application on the publisher channel before the data is processed by the shim. This is the first chance to see (and modify) the data received by the application. If the data is not in XML format, you must modify it so that the shim can convert the byte array into an XML document.

Parameters:
data - The byte array received from the application on the publisher channel.
Returns:
A byte array that can be converted to an XML document.
See Also:
DocumentModifiers.modifyPublisherRequest(org.w3c.dom.Document)

modifyPublisherResponse

public byte[] modifyPublisherResponse(byte[] data)
Processes the result (or response) of a publisher event before it is returned to the application.

Parameters:
data - The response data to be returned to the application in response to a publisher event.
Returns:
The data to be sent to the application in response to a publisher event.
See Also:
DocumentModifiers.modifyPublisherResponse(org.w3c.dom.Document)

modifySubscriberRequest

public byte[] modifySubscriberRequest(byte[] data)
Processes all data that is sent to the application on the subscriber channel. At this point, the data is still in XML format. If the application expects a different format, you'll need to modify the data here.

Parameters:
data - The data intended for the application.
Returns:
The data to send to the application.
See Also:
DocumentModifiers.modifySubscriberRequest(org.w3c.dom.Document)

modifySubscriberResponse

public byte[] modifySubscriberResponse(byte[] data)
Processes the result (or response) of a subscriber command before the shim returns the result to the engine. If the data isn't in XML format, you must convert the data so that the shim can create an XML document from the byte array.

Parameters:
data - The byte array received from the application in response to a subscriber command.
Returns:
A byte array that can be converted to an XML document.
See Also:
DocumentModifiers.modifySubscriberResponse(org.w3c.dom.Document)