Package org.apache.cxf.ws.rm
Class EncoderDecoder
java.lang.Object
org.apache.cxf.ws.rm.EncoderDecoder
- Direct Known Subclasses:
EncoderDecoder10AImpl,EncoderDecoder10Impl,EncoderDecoder11Impl
Base class for converting WS-ReliableMessaging structures to and from XML. Subclasses provide version-specific
encoding and decoding.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.cxf.headers.HeaderBuilds an element containing a WS-RM Fault.protected abstract ObjectBuild a header fault, using the correct protocol variation.voidbuildHeaders(RMProperties rmps, List<org.apache.cxf.headers.Header> headers) Builds an element containing WS-RM headers.protected abstract voidbuildHeaders(SequenceType seq, Collection<SequenceAcknowledgement> acks, Collection<AckRequestedType> reqs, boolean last, List<org.apache.cxf.headers.Header> headers) Build all required headers, using the correct protocol variation.abstract CreateSequenceTypeconvertReceivedCreateSequence(Object create) Convert a received CreateSequence message to internal form.abstract CreateSequenceResponseTypeConvert a received CreateSequenceResponse message to internal form.abstract TerminateSequenceTypeConvert a received TerminateSequence message to internal form.abstract ObjectConvert a CreateSequenceResponse message to the correct format for transmission.abstract ObjectconvertToSend(CreateSequenceType create) Convert a CreateSequence message to the correct format for transmission.abstract ObjectConvert a TerminateSequence message to the correct format for transmission.abstract AckRequestedTypeUnmarshals a AckRequestedType, converting it if necessary to the internal form.abstract SequenceAcknowledgementUnmarshals a SequenceAcknowledgement, converting it if necessary to the internal form.abstract SequenceTypedecodeSequenceType(Element elem) Unmarshals a SequenceType, converting it if necessary to the internal form.abstract CloseSequenceTypeGenerates a CloseSequenceType if a SequenceType represents a last message state.abstract ElementMarshals an Identifier to the appropriate external form.abstract ElementMarshals a SequenceAcknowledgement to the appropriate external form.abstract RMConstantsGet the WS-ReliableMessaging constants used by this encoder/decoder.protected abstract jakarta.xml.bind.JAXBContextGet context for JAXB marshalling/unmarshalling.abstract Class<?>Get the class used for the CreateSequenceResponseType.abstract Class<?>Get the class used for the CreateSequenceType.protected org.apache.cxf.databinding.DataBindingGet the databinding used for the header objectsabstract Class<?>Get the class used for the TerminateSequenceResponseType.abstract Class<?>Get the class used for the TerminateSequenceType.abstract StringGet the WS-Addressing namespace used by this encoder/decoder.abstract StringGet the WS-ReliableMessaging namespace used by this encoder/decoder.
-
Field Details
-
databinding
protected volatile org.apache.cxf.databinding.DataBinding databinding
-
-
Constructor Details
-
EncoderDecoder
public EncoderDecoder()
-
-
Method Details
-
getContext
protected abstract jakarta.xml.bind.JAXBContext getContext() throws jakarta.xml.bind.JAXBExceptionGet context for JAXB marshalling/unmarshalling.- Returns:
- context
- Throws:
jakarta.xml.bind.JAXBException
-
getWSRMNamespace
Get the WS-ReliableMessaging namespace used by this encoder/decoder.- Returns:
- URI
-
getWSANamespace
Get the WS-Addressing namespace used by this encoder/decoder.- Returns:
- URI
-
getConstants
Get the WS-ReliableMessaging constants used by this encoder/decoder.- Returns:
-
getCreateSequenceType
Get the class used for the CreateSequenceType.- Returns:
- class
-
getCreateSequenceResponseType
Get the class used for the CreateSequenceResponseType.- Returns:
- class
-
getTerminateSequenceType
Get the class used for the TerminateSequenceType.- Returns:
- class
-
getTerminateSequenceResponseType
Get the class used for the TerminateSequenceResponseType.- Returns:
- class
-
getDataBinding
protected org.apache.cxf.databinding.DataBinding getDataBinding() throws jakarta.xml.bind.JAXBExceptionGet the databinding used for the header objects- Returns:
- databinding
- Throws:
jakarta.xml.bind.JAXBException
-
buildHeaders
public void buildHeaders(RMProperties rmps, List<org.apache.cxf.headers.Header> headers) throws jakarta.xml.bind.JAXBException Builds an element containing WS-RM headers. This adds the appropriate WS-RM namespace declaration to the element, and then adds any WS-RM headers set in the supplied properties as child elements.- Parameters:
rmps-headers- the list of headers- Throws:
jakarta.xml.bind.JAXBException
-
buildHeaderFault
public org.apache.cxf.headers.Header buildHeaderFault(SequenceFault sf) throws jakarta.xml.bind.JAXBException Builds an element containing a WS-RM Fault. This adds the appropriate WS-RM namespace declaration to the element, and then adds the Fault as a child element.- Parameters:
sf-- Returns:
- Header fault
- Throws:
jakarta.xml.bind.JAXBException
-
buildHeaders
protected abstract void buildHeaders(SequenceType seq, Collection<SequenceAcknowledgement> acks, Collection<AckRequestedType> reqs, boolean last, List<org.apache.cxf.headers.Header> headers) throws jakarta.xml.bind.JAXBException Build all required headers, using the correct protocol variation.- Parameters:
seq-acks-reqs-last-headers-- Throws:
jakarta.xml.bind.JAXBException
-
buildHeaderFaultObject
Build a header fault, using the correct protocol variation.- Parameters:
sf-- Returns:
- the object marshallable with the JAXContext
-
encodeSequenceAcknowledgement
public abstract Element encodeSequenceAcknowledgement(SequenceAcknowledgement ack) throws jakarta.xml.bind.JAXBException Marshals a SequenceAcknowledgement to the appropriate external form.- Parameters:
ack-- Returns:
- element
- Throws:
jakarta.xml.bind.JAXBException
-
encodeIdentifier
Marshals an Identifier to the appropriate external form.- Parameters:
id-- Returns:
- element
- Throws:
jakarta.xml.bind.JAXBException
-
decodeSequenceType
Unmarshals a SequenceType, converting it if necessary to the internal form.- Parameters:
elem-- Returns:
- Throws:
jakarta.xml.bind.JAXBException
-
decodeSequenceTypeCloseSequence
public abstract CloseSequenceType decodeSequenceTypeCloseSequence(Element elem) throws jakarta.xml.bind.JAXBException Generates a CloseSequenceType if a SequenceType represents a last message state.- Parameters:
elem-- Returns:
- CloseSequenceType if last message state, else
null - Throws:
jakarta.xml.bind.JAXBException
-
decodeSequenceAcknowledgement
public abstract SequenceAcknowledgement decodeSequenceAcknowledgement(Element elem) throws jakarta.xml.bind.JAXBException Unmarshals a SequenceAcknowledgement, converting it if necessary to the internal form.- Parameters:
elem-- Returns:
- Throws:
jakarta.xml.bind.JAXBException
-
decodeAckRequestedType
public abstract AckRequestedType decodeAckRequestedType(Element elem) throws jakarta.xml.bind.JAXBException Unmarshals a AckRequestedType, converting it if necessary to the internal form.- Parameters:
elem-- Returns:
- Throws:
jakarta.xml.bind.JAXBException
-
convertToSend
Convert a CreateSequence message to the correct format for transmission.- Parameters:
create-- Returns:
- converted
-
convertToSend
Convert a CreateSequenceResponse message to the correct format for transmission.- Parameters:
create-- Returns:
- converted
-
convertToSend
Convert a TerminateSequence message to the correct format for transmission.- Parameters:
term-- Returns:
- converted
-
convertReceivedTerminateSequence
Convert a received TerminateSequence message to internal form.- Parameters:
term-- Returns:
- converted
-
convertReceivedCreateSequence
Convert a received CreateSequence message to internal form.- Parameters:
create-- Returns:
- converted
-
convertReceivedCreateSequenceResponse
Convert a received CreateSequenceResponse message to internal form.- Parameters:
create-- Returns:
- converted
-