org.apache.directory.shared.ldap.message.spi
Interface TransformerSpi

All Superinterfaces:
ProviderObject
All Known Implementing Classes:
TwixTransformer

public interface TransformerSpi
extends ProviderObject

Standard transformer service provider interface. Transforms demarshaled containment trees of compiler generated stubs into Message implementations in both directions: marshaling and demarshaling.

Version:
$Revision: 379008 $
Author:
Alex Karasulu, $Author: akarasulu $

Method Summary
 java.lang.Object transform(Message a_msg)
          Transforms the agnostic Message representation of an LDAPv3 ASN.1 message envelope into a compiler generated and BER lib specific stub containment tree.
 Message transform(java.lang.Object a_obj)
          Transforms the containment tree rooted at some compiler stub object into a Message implementing object instance.
 
Methods inherited from interface org.apache.directory.shared.ldap.message.spi.ProviderObject
getProvider
 

Method Detail

transform

public Message transform(java.lang.Object a_obj)
                  throws ProviderException
Transforms the containment tree rooted at some compiler stub object into a Message implementing object instance. Transformer method used after demarshaling a PDU off the wire - which consequently generated the argument.

Parameters:
a_obj - the compiler specific root object holding the containment tree for the LDAPv3 message envelope. For example for the Snacc provider this object would be an instance of the LDAPMessage stub class.
Returns:
the compiler agnostic Message implemenating object representing the containment tree held by the message envelope argument.
Throws:
ProviderException - to indicate an error while attempting to transform library/compiler specific message envelope into agnostic message. Provider specific exceptions encountered while transforming can be held within this subclass of MultiException.

transform

public java.lang.Object transform(Message a_msg)
                           throws ProviderException
Transforms the agnostic Message representation of an LDAPv3 ASN.1 message envelope into a compiler generated and BER lib specific stub containment tree. Transformer method used before marshaling a PDU onto the wire - the resultant object generated by this transform overload is the object marshaled.

Parameters:
a_msg - The Message object used to generate the compiler stub based containment tree.
Returns:
the compiler stub based containment tree representing the Message transformed into the provider's format. For example for the Snacc provider this object would be an instance of the LDAPMessage stub class.
Throws:
ProviderException - to indicate an error while attempting to transform library/compiler specific message envelope into agnostic message. Provider specific exceptions encountered while transforming can be held within this subclass of MultiException.


Copyright © 2003-2006 . All Rights Reserved.