Package com.sun.xml.ws.spi.db
Interface XMLBridge<T>
- All Known Implementing Classes:
BridgeWrapper,MarshallerBridge,RepeatedElementBridge,WrapperBridge,WrapperBridge
public interface XMLBridge<T>
The XMLBridge is a Glassfish JAXWS side of Glassfish JAXB Bridge.
Mini-marshaller/unmarshaller that is specialized for a particular
element name and a type.
Instances of this class is stateless and multi-thread safe. They are reentrant.
All the marshal operation generates fragments.
Subject to change without notice.
- Since:
- JAXB 2.0 EA1
- Author:
- Kohsuke Kawaguchi, shih-chang.chen@oracle.com
-
Method Summary
Modifier and TypeMethodDescriptioncontext()Gets theBindingContextto which this object belongs.Gets theTypeInfofrom which this bridge was created.voidmarshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) voidmarshal(T object, XMLStreamWriter output, AttachmentMarshaller am) voidvoidvoidmarshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) booleanThis can be used to determine whether XMLStreamWriter or OutputStream is prefered by the implementation.unmarshal(InputStream in) Unmarshals the specified type object.unmarshal(Source in, AttachmentUnmarshaller au) unmarshal(Node n, AttachmentUnmarshaller au)
-
Method Details
-
context
Gets theBindingContextto which this object belongs.- Since:
- 2.1
-
marshal
- Throws:
JAXBException
-
marshal
void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException - Throws:
JAXBException- Since:
- 2.0.2
-
marshal
- Throws:
JAXBException
-
marshal
- Throws:
JAXBException- Since:
- 2.0.2
-
marshal
- Throws:
JAXBException- Since:
- 2.0 EA4
-
unmarshal
@NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException - Throws:
JAXBException- Since:
- 2.0.3
-
unmarshal
- Throws:
JAXBException- Since:
- 2.0.3
-
unmarshal
Unmarshals the specified type object.- Parameters:
in- the parser must be pointing at a start tag that encloses the XML type that thisXMLBridgeis instanciated for.- Returns:
- never null.
- Throws:
JAXBException- if there was an error while unmarshalling.- Since:
- 2.0 EA1
-
unmarshal
- Throws:
JAXBException- Since:
- 2.0.3
-
getTypeInfo
TypeInfo getTypeInfo()Gets theTypeInfofrom which this bridge was created. -
supportOutputStream
boolean supportOutputStream()This can be used to determine whether XMLStreamWriter or OutputStream is prefered by the implementation.- Returns:
- true if marshall to OutputStream is supported in the implementation.
-