org.apache.directory.shared.asn1.codec.stateful
Interface StatefulEncoder

All Known Subinterfaces:
ProviderEncoder
All Known Implementing Classes:
AbstractStatefulEncoder, HexEncoder, LdapEncoder, MessageEncoder

public interface StatefulEncoder

The StatefulEncoder interface.

Version:
$Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sat, 07 Jun 2008) $
Author:
Apache Directory Project

Method Summary
 void encode(java.lang.Object obj)
          Encodes a Message object piece by piece often emitting chunks of the final PDU to the callback if present.
 void setCallback(EncoderCallback cb)
          Sets the callback of the underlying implementation.
 void setEncoderMonitor(EncoderMonitor monitor)
          Sets the monitor of the underlying implementation.
 

Method Detail

encode

void encode(java.lang.Object obj)
            throws EncoderException
Encodes a Message object piece by piece often emitting chunks of the final PDU to the callback if present.

Parameters:
obj - the message object to encode into a PDU
Throws:
EncoderException - if there are problems while encoding

setCallback

void setCallback(EncoderCallback cb)
Sets the callback of the underlying implementation. There is no need for any special callbacks because when encoding we do not need to transform before a value return as we did in the decoder.

Parameters:
cb - the callback to set on the underlying provider specific encoder

setEncoderMonitor

void setEncoderMonitor(EncoderMonitor monitor)
Sets the monitor of the underlying implementation.

Parameters:
monitor - the monitor to set on the underlying implementation


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.