/**
* {@inheritDoc}
*/
public final void action( E container ) throws DecoderException
{
TLV tlv = container.getCurrentTLV();
// The Length should not be null
if ( tlv.getLength() == 0 )
{
LOG.error( I18n.err( I18n.ERR_04066 ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
}
// Now, let's decode the HostAddresses
Asn1Decoder hostAddressesDecoder = new Asn1Decoder();
HostAddressesContainer hostAddressesContainer = new HostAddressesContainer();
// Passes the Stream to the decoder
hostAddressesContainer.setStream( container.getStream() );
// Decode the HostAddresses PDU
try
{
hostAddressesDecoder.decode( container.getStream(), hostAddressesContainer );
}
catch ( DecoderException de )
{
throw de;
}
// Store the HostAddresses in the container
HostAddresses hostAddresses = hostAddressesContainer.getHostAddresses();
setHostAddresses( hostAddresses, container );
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
// Update the parent
container.updateParent();
if ( IS_DEBUG )