@Contract public interface XmlService
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAMESPACE
The default namespace of the document
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createBean(Class<T> beanInterface)
This creates an instance of the given bean type
of with no fields of the bean filled
in.
|
<T> XmlRootHandle<T> |
createEmptyHandle(Class<T> jaxbAnnotationInterface)
This creates an empty handle (root will initially be null) corresponding to
the given interface class
|
<T> XmlRootHandle<T> |
createEmptyHandle(Class<T> jaxbAnnotationInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
This creates an empty handle (root will initially be null) corresponding to
the given interface class
|
<T> void |
marshal(OutputStream outputStream,
XmlRootHandle<T> rootHandle)
Will marshal the given tree into the given stream.
|
<T> XmlRootHandle<T> |
unmarshal(InputStream inputStream,
Class<T> jaxbAnnotatedInterface)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(InputStream inputStream,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(URI uri,
Class<T> jaxbAnnotatedInterface)
Unmarshalls the given URI using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(URI uri,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshalls the given URI using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(XMLStreamReader reader,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshals an XML stream using the jaxb annotated interface.
|
static final String DEFAULT_NAMESPACE
<T> XmlRootHandle<T> unmarshal(URI uri, Class<T> jaxbAnnotatedInterface)
XmlServiceParser
to parse the file.uri - The non-null URI whereby to find the xml corresponding to the classjaxbAnnotatedClassOrInterface - The non-null class corresonding to the Xml to be parsed<T> XmlRootHandle<T> unmarshal(URI uri, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServiceParser
to parse the file.uri - The non-null URI whereby to find the xml corresponding to the classjaxbAnnotatedClassOrInterface - The non-null interface corresponding to the Xml to be parsedadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)<T> XmlRootHandle<T> unmarshal(XMLStreamReader reader, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
reader - The non-null XMLStreamReader representing the XML to be readjaxbAnnotatedClassOrInterface - The non-null interface corresponding to the Xml to be parsedadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)<T> XmlRootHandle<T> unmarshal(InputStream inputStream, Class<T> jaxbAnnotatedInterface)
XmlServiceParser
to parse the file.
The beans will be included in the service registry and the configuration
hub as appropriateinputStream - The non-null input stream to read. Will not close this streamjaxbAnnotatedClassOrInterface - The non-null interface corresponding to the Xml to be parsed<T> XmlRootHandle<T> unmarshal(InputStream inputStream, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServiceParser
to parse the file.inputStream - The non-null input stream to read. Will not close this streamjaxbAnnotatedClassOrInterface - The non-null interface corresponding to the Xml to be parsedadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)<T> XmlRootHandle<T> createEmptyHandle(Class<T> jaxbAnnotationInterface, boolean advertiseInRegistry, boolean advertiseInHub)
jaxbAnnotationInterface - The non-null interface class corresponding to
the XML to be parsedadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)<T> XmlRootHandle<T> createEmptyHandle(Class<T> jaxbAnnotationInterface)
jaxbAnnotationInterface - The non-null interface class corresponding to
the XML to be parsed<T> T createBean(Class<T> beanInterface)
<T> void marshal(OutputStream outputStream, XmlRootHandle<T> rootHandle) throws IOException
outputStream - A non-closed output stream. This method will
not close the output streamrootHandle - A non-null root handle that may or may not
have been created with this XmlService implementationIOException - On any exception that might happenCopyright © 2009-2017 Oracle Corporation. All Rights Reserved.