org.apache.ws.jaxme.impl

Class JAXBContextImpl

public class JAXBContextImpl extends JAXBContext

JaxMe's implementation of a JAXBContext.

Version: $Id: JAXBContextImpl.java 232067 2005-03-10 10:14:08Z jochen $

Author: Jochen Wiedmann

Field Summary
static StringCONFIGURATION_URI
The namespace of JaxMe's configuration files.
Constructor Summary
protected JAXBContextImpl()
Method Summary
voidaddManager(JMManager pManager)
Invoked from the SAX handler when reading the config file for adding another instance of JMManager.
ConfigurationcreateConfiguration(Attributes pAttributes)
Invoked from the SAX handler when loading the config file.
static JAXBContextImplcreateContext()
Creates a new instance of {@link javax.xml.bind.JAXBContext}.
static JAXBContextImplcreateContext(String pPackageNames, ClassLoader pClassLoader)
Creates a new instance of {@link javax.xml.bind.JAXBContext}.
MarshallercreateMarshaller()
UnmarshallercreateUnmarshaller()
ValidatorcreateValidator()
ClassLoadergetClassLoader()

Returns the ClassLoader to use.

JMMarshallergetJMMarshaller()

Returns a new JMMarshaller.

ClassgetJMMarshallerClass()

Returns the JMMarshaller class to use.

PMgetJMPM(Class pElementInterface)

Returns a new instance of JMPM.

PMgetJMPM(QName pQName)

Returns a new instance of JMPM.

JMUnmarshallergetJMUnmarshaller()

Returns a new JMUnmarshaller.

ClassgetJMUnmarshallerClass()

Sets the JMUnmarshaller class to use.

JMValidatorgetJMValidator()

Returns a new JMValidator.

ClassgetJMValidatorClass()

Returns the JMValidator class to use.

JMManagergetManager(QName pQName)
Returns a Manager for the given QName.
JMManagergetManager(Class pElementInterface)
Returns a Manager for the given element interface.
protected JMManagergetManagerByInterface(Class pElementInterface)
protected JMManagergetManagerByQName(QName pQName)
JMManagergetManagerS(Class pElementInterface)
Returns a Manager for the given element interface.
StringgetPackageNames()

Returns the package names managed by this context.

protected voidinit()

Initializes the context by loading the configuration or the configurations from the given classpath.

protected voidsetClassLoader(ClassLoader pClassLoader)

Sets the ClassLoader to use.

protected voidsetJMMarshallerClass(Class pClass)

Sets the JMMarshaller class to use.

protected voidsetJMUnmarshallerClass(Class pClass)

Sets the JMUnmarshaller class to use.

protected voidsetJMValidatorClass(Class pClass)

Sets the JMValidator class to use.

protected voidsetPackageNames(String pPackageNames)

Sets the package names managed by this context.

Field Detail

CONFIGURATION_URI

public static final String CONFIGURATION_URI
The namespace of JaxMe's configuration files.

Constructor Detail

JAXBContextImpl

protected JAXBContextImpl()

Method Detail

addManager

public void addManager(JMManager pManager)
Invoked from the SAX handler when reading the config file for adding another instance of JMManager.

createConfiguration

public Configuration createConfiguration(Attributes pAttributes)
Invoked from the SAX handler when loading the config file.

createContext

public static JAXBContextImpl createContext()
Creates a new instance of {@link javax.xml.bind.JAXBContext}. Invoked implicitly by {@link javax.xml.bind.JAXBContext#newInstance(java.lang.String)}.

createContext

public static JAXBContextImpl createContext(String pPackageNames, ClassLoader pClassLoader)
Creates a new instance of {@link javax.xml.bind.JAXBContext}. Invoked implicitly by {@link javax.xml.bind.JAXBContext#newInstance(String, ClassLoader)}

createMarshaller

public Marshaller createMarshaller()

createUnmarshaller

public Unmarshaller createUnmarshaller()

createValidator

public Validator createValidator()

getClassLoader

public ClassLoader getClassLoader()

Returns the ClassLoader to use.

getJMMarshaller

public JMMarshaller getJMMarshaller()

Returns a new JMMarshaller.

getJMMarshallerClass

public Class getJMMarshallerClass()

Returns the JMMarshaller class to use.

getJMPM

public PM getJMPM(Class pElementInterface)

Returns a new instance of JMPM.

getJMPM

public PM getJMPM(QName pQName)

Returns a new instance of JMPM.

getJMUnmarshaller

public JMUnmarshaller getJMUnmarshaller()

Returns a new JMUnmarshaller.

getJMUnmarshallerClass

public Class getJMUnmarshallerClass()

Sets the JMUnmarshaller class to use.

getJMValidator

public JMValidator getJMValidator()

Returns a new JMValidator.

getJMValidatorClass

public Class getJMValidatorClass()

Returns the JMValidator class to use.

getManager

public JMManager getManager(QName pQName)
Returns a Manager for the given QName.

Throws: JAXBException No Manager is registered for the given QName.

getManager

public JMManager getManager(Class pElementInterface)
Returns a Manager for the given element interface. Same method than {@link #getManager(Class)}, except that it throws a {@link JAXBException}.

Throws: JAXBException No Manager is registered for the given QName.

See Also: getManagerS

getManagerByInterface

protected JMManager getManagerByInterface(Class pElementInterface)

getManagerByQName

protected JMManager getManagerByQName(QName pQName)

getManagerS

public JMManager getManagerS(Class pElementInterface)
Returns a Manager for the given element interface. Same method than {@link #getManager(Class)}, except that it throws a {@link SAXException}.

Throws: SAXException No Manager is registered for the given QName.

See Also: getManager

getPackageNames

public String getPackageNames()

Returns the package names managed by this context.

init

protected void init()

Initializes the context by loading the configuration or the configurations from the given classpath.

setClassLoader

protected void setClassLoader(ClassLoader pClassLoader)

Sets the ClassLoader to use.

setJMMarshallerClass

protected void setJMMarshallerClass(Class pClass)

Sets the JMMarshaller class to use.

setJMUnmarshallerClass

protected void setJMUnmarshallerClass(Class pClass)

Sets the JMUnmarshaller class to use.

setJMValidatorClass

protected void setJMValidatorClass(Class pClass)

Sets the JMValidator class to use.

setPackageNames

protected void setPackageNames(String pPackageNames)

Sets the package names managed by this context.