org.idoox.wasp.serialization
Interface DeserializationChain


public interface DeserializationChain

This class represents a chain of deserializers.

Since:
3.2
Component:
Core

Method Summary
 Deserializer getNextDeserializerAs(java.lang.String deserializerType)
          returns the next deserializer of the chain.
 java.lang.String getNextDeserializersType()
          returns the jax-rpc type of the next deserializer
 boolean hasMoreDeserializers()
          returns true if there are any deserializers left in the chain
 void removeDeserializer(Deserializer deserializer)
          removes deserializer from the chain, so that it won't be returned by getDeserializerAs(...)
 

Method Detail

removeDeserializer

public void removeDeserializer(Deserializer deserializer)
removes deserializer from the chain, so that it won't be returned by getDeserializerAs(...)

Parameters:
deserializer - the deserializer to be removed

hasMoreDeserializers

public boolean hasMoreDeserializers()
returns true if there are any deserializers left in the chain

Returns:
true if there is at least one deserializer in the chain, false otherwise.

getNextDeserializersType

public java.lang.String getNextDeserializersType()
                                          throws java.util.NoSuchElementException
returns the jax-rpc type of the next deserializer

Returns:
the jax-rpc type of the first deserializer, estimated by calling getMechanismType() on the deserializer.
Throws:
java.util.NoSuchElementException - if the chain is empty.

getNextDeserializerAs

public Deserializer getNextDeserializerAs(java.lang.String deserializerType)
                                   throws java.util.NoSuchElementException
returns the next deserializer of the chain. If the deserializer is of different type than deserializerType, a conversion is performed (if possible) to this type.

Parameters:
deserializerType - the required type of the deserializer.
Returns:
the next deserializer
Throws:
java.util.NoSuchElementException - if the chain is empty.