com.sun.xml.ws.developer
Class UsesJAXBContextFeature

java.lang.Object
  extended by javax.xml.ws.WebServiceFeature
      extended by com.sun.xml.ws.developer.UsesJAXBContextFeature

@ManagedData
public class UsesJAXBContextFeature
extends WebServiceFeature

A WebServiceFeature that instructs the JAX-WS runtime to use a specific JAXBContextFactory instance of creating JAXBContext.

Since:
2.1.5
See Also:
UsesJAXBContext

Field Summary
static String ID
          Constant value identifying the UsesJAXBContext feature.
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
UsesJAXBContextFeature(Class<? extends JAXBContextFactory> factoryClass)
          Creates UsesJAXBContextFeature.
UsesJAXBContextFeature(JAXBContextFactory factory)
          Creates UsesJAXBContextFeature.
UsesJAXBContextFeature(com.sun.xml.bind.api.JAXBRIContext context)
          Creates UsesJAXBContextFeature.
 
Method Summary
 JAXBContextFactory getFactory()
          Gets the JAXBContextFactory instance to be used for creating JAXBContext for SEI.
 String getID()
           
 
Methods inherited from class javax.xml.ws.WebServiceFeature
isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Constant value identifying the UsesJAXBContext feature.

See Also:
Constant Field Values
Constructor Detail

UsesJAXBContextFeature

public UsesJAXBContextFeature(@NotNull
                              Class<? extends JAXBContextFactory> factoryClass)
Creates UsesJAXBContextFeature.

Parameters:
factoryClass - This class has to have a public no-arg constructor, which will be invoked to create a new instance. JAXBContextFactory.createJAXBContext(SEIModel, List, List) will be then called to create JAXBContext.

UsesJAXBContextFeature

public UsesJAXBContextFeature(@Nullable
                              JAXBContextFactory factory)
Creates UsesJAXBContextFeature. This version allows JAXBContextFactory to carry application specific state.

Parameters:
factory - Uses a specific instance of JAXBContextFactory to create JAXBContext.

UsesJAXBContextFeature

public UsesJAXBContextFeature(@Nullable
                              com.sun.xml.bind.api.JAXBRIContext context)
Creates UsesJAXBContextFeature. This version allows you to create JAXBRIContext upfront and uses it.

Method Detail

getFactory

@ManagedAttribute
@Nullable
public JAXBContextFactory getFactory()
Gets the JAXBContextFactory instance to be used for creating JAXBContext for SEI.

Returns:
null if the default JAXBContext shall be used.

getID

@ManagedAttribute
public String getID()
Specified by:
getID in class WebServiceFeature


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.