Class WSEndpointMOMProxy
- java.lang.Object
-
- com.sun.xml.ws.api.server.WSEndpoint
-
- com.sun.xml.ws.server.WSEndpointMOMProxy
-
- All Implemented Interfaces:
Component
,ComponentRegistry
,Closeable
,AutoCloseable
,org.glassfish.gmbal.ManagedObjectManager
public class WSEndpointMOMProxy extends WSEndpoint implements org.glassfish.gmbal.ManagedObjectManager
ManagedObjectManager
proxy class forWSEndpointImpl
instances that could be used when Gmbal API calls need to be deferred. The proxy tries to defer a need of a real ManagedObjectManager instance to the time when any method fromManagedObjectManager
is invoked on it. In this case a real instance of ManagedObjectManager is obtained from WSEndpointImpl and the method is rather invoked on this object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.WSEndpoint
WSEndpoint.CompletionCallback, WSEndpoint.PipeHead
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(AnnotatedElement element, Annotation annotation)
Method to add an annotation to an element that cannot be modified.void
addInheritedAnnotations(Class<?> cls)
Add all annotations for this class as if they were declared on the inheritance parent(s) of the class (immediate superclass for a class, all immediate superinterfaces for an interface).void
close()
void
closeManagedObjectManager()
Close the ManagedObjectManager for this endpoint.Codec
createCodec()
Gets the Endpoint's codec that is used to encode/decodeMessage
s.WSEndpoint.PipeHead
createPipeHead()
Creates a newWSEndpoint.PipeHead
to process incoming requests.org.glassfish.gmbal.GmbalMBean
createRoot()
Create a default root MBean.org.glassfish.gmbal.GmbalMBean
createRoot(Object root)
Create a root MBean from root, which much have a method with theorg.glassfish.gmbal.GmbalMBean
createRoot(Object root, String name)
Create a root MBean from root with the given name.Packet
createServiceResponseForException(ThrowableContainerPropertySet tc, Packet responsePacket, SOAPVersion soapVersion, WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding)
This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.void
dispose()
Indicates that theWSEndpoint
is about to be turned off, and will no longer serve any packet anymore.String
dumpSkeleton(Object obj)
Dump the skeleton used in the implementation of the MBean for obj.boolean
equalsProxiedInstance(WSEndpoint endpoint)
Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.org.glassfish.gmbal.AMXClient
getAMXClient(Object obj)
Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom.ServerTubeAssemblerContext
getAssemblerContext()
This is only needed to expose info for monitoring.WSBinding
getBinding()
Represents the binding for which thisWSEndpoint
is created for.Set
getComponentRegistry()
Gets the list ofEndpointComponent
that are associated with this endpoint.Container
getContainer()
Gets theContainer
object.String
getDomain()
Return the domain name that was used when this ManagedObjectManager was created.jakarta.xml.ws.EndpointReference
getEndpointReference(Class clazz, String address, String wsdlAddress, List metadata, List referenceParameters)
jakarta.xml.ws.EndpointReference
getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters)
Return EndpointReference instance, based on passed parameters and spec version represented by clazzClass
getImplementationClass()
Gets the application endpointClass
that eventually serves the request.org.glassfish.gmbal.ManagedObjectManager
getManagedObjectManager()
Returns a real instance ofManagedObjectManager
MBeanServer
getMBeanServer()
Get the current MBeanServer.Object
getObject(ObjectName oname)
Get the Object that was registered with the given ObjectName.ObjectName
getObjectName(Object obj)
Get the ObjectName for the given object (which must have been registered via a register call).org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManager
getObjectRegistrationManager()
Return an ObjectRegistrationManager as required in the pfl timer services.OperationDispatcher
getOperationDispatcher()
Nullable when there is no associated WSDL ModelPolicyMap
getPolicyMap()
Gives the PolicMap that captures the Policy for the endpointWSDLPort
getPort()
Gets the port that this endpoint is serving.QName
getPortName()
Gets the application endpoint's portName.ResourceBundle
getResourceBundle()
Get the resource bundle (if any) set by setResourceBundle.Object
getRoot()
Return the root of this ManagedObjectManager.SEIModel
getSEIModel()
Gets theSEIModel
that represents the relationship between WSDL and Java SEI.ServiceDefinition
getServiceDefinition()
Gets the description of the service.QName
getServiceName()
Gets the application endpoint's serviceName.WSEndpointImpl
getWsEndpoint()
boolean
isInitialized()
Returnstrue
if this proxy contains a reference to real ManagedObjectManager instance,false
otherwise.boolean
isManagedObject(Object obj)
Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false.org.glassfish.gmbal.GmbalMBean
register(Object parent, Object obj)
Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation.org.glassfish.gmbal.GmbalMBean
register(Object parent, Object obj, String name)
Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName.org.glassfish.gmbal.GmbalMBean
registerAtRoot(Object obj)
Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation.org.glassfish.gmbal.GmbalMBean
registerAtRoot(Object obj, String name)
Registers the MBean for obj at the root MBean for the ObjectManager, using the given name.void
resumeJMXRegistration()
Decrements the suspend counter, if the counter is greater than 0.void
schedule(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)
Schedule invocation of web service asynchronously.void
setExecutor(Executor exec)
Set thisExecutor
to run asynchronous requests using this executor.void
setJMXRegistrationDebug(boolean flag)
Set debugging for JMX registrations.void
setMBeanServer(MBeanServer server)
Set the MBeanServer to which all MBeans using this interface are published.void
setRegistrationDebug(org.glassfish.gmbal.ManagedObjectManager.RegistrationDebugLevel level)
Print debug output to System.out.void
setResourceBundle(ResourceBundle rb)
Set the ResourceBundle to use for getting localized descriptions.void
setRuntimeDebug(boolean flag)
Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger.void
setTypelibDebug(int level)
Enabled generation of debug log for type evaluator debugging.void
stripPackagePrefix()
Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name.void
stripPrefix(String... str)
Add a type prefix to strip from type names, to shorten the names for a better presentation to the user.void
suppressDuplicateRootReport(boolean suppressReport)
Suppress reporting of a duplicate root name.void
suspendJMXRegistration()
If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called.void
unregister(Object obj)
Unregister the Open MBean corresponding to obj from the mbean server.-
Methods inherited from class com.sun.xml.ws.api.server.WSEndpoint
create, create, create, create, getBoundEndpoints, getComponents, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getEngine, getSPI, process, schedule
-
-
-
-
Method Detail
-
getManagedObjectManager
public org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
Returns a real instance ofManagedObjectManager
- Specified by:
getManagedObjectManager
in classWSEndpoint
- Returns:
- an ManagedObjectManager instance
-
isInitialized
public boolean isInitialized()
Returnstrue
if this proxy contains a reference to real ManagedObjectManager instance,false
otherwise.- Returns:
true
if ManagedObjectManager has been created,false
otherwise.
-
getWsEndpoint
public WSEndpointImpl getWsEndpoint()
-
suspendJMXRegistration
public void suspendJMXRegistration()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called. Each call increments a counter, so that nested and overlapping calls from multiple threads work correctly. May be called at any time.- Specified by:
suspendJMXRegistration
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
resumeJMXRegistration
public void resumeJMXRegistration()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Decrements the suspend counter, if the counter is greater than 0. When the counter goes to zero, it causes all MBeans created since a previous call to suspendJMXRegistration incremented the counter from 0 to 1 to be registered with the JMX MBeanServer. After this call, all new MBean registration calls to the JMX MBeanServer happen within the register call. May be called at any time.- Specified by:
resumeJMXRegistration
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
isManagedObject
public boolean isManagedObject(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false. Only such objects may be registered to create MBeans. May be called at any time.- Specified by:
isManagedObject
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Create a default root MBean. One of the createRoot methods must be called before any of the registration methods may be called. Only one call to a createRoot method is permitted after an ManagedObjectManager is created.- Specified by:
createRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Returns:
- A default root MBean which supports only the AMX attributes.
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot(Object root)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Create a root MBean from root, which much have a method with the- Specified by:
createRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
root
- The Java object to be used to construct the root.- Returns:
- The newly constructed MBean.
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot(Object root, String name)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Create a root MBean from root with the given name. One of the createRoot methods must be called before any of the registration methods may be called. Only one call to createRoot is permitted after an ManagedObjectManager is created.- Specified by:
createRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
root
- The Java object to be used to construct the root.name
- The ObjectName name field to be used in the ObjectName of the MBean constructed from root.- Returns:
- The newly constructed MBean.
-
getRoot
public Object getRoot()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Return the root of this ManagedObjectManager. May be called at any time.- Specified by:
getRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Returns:
- the root constructed in a createRoot operation, or null if called before a createRoot call.
-
register
public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj, String name)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName. The MBeanServer from setMBeanServer (or its default) is used. Here parent is considered to contain obj, and this containment is represented by the construction of the ObjectName following the AMX specification for ObjectNames.The MBeanInfo for the result is actually ModelMBeanInfo, and may contain extra metadata as defined using annotations defined with the
- Specified by:
register
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
parent
- The parent object that contains obj.obj
- The managed object we are registering.name
- The name to use for registering this object.- Returns:
- The MBean constructed from obj.
-
register
public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation.This version of register should also be used to register singletons.
- Specified by:
register
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
parent
- The parent object that contains obj.obj
- The managed object we are registering.- Returns:
- The MBean constructed from obj.
-
registerAtRoot
public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj, String name)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Registers the MBean for obj at the root MBean for the ObjectManager, using the given name. Exactly the same as mom.register( mom.getRoot(), obj, name ).Must be called after a successful createRoot call.
This version of register should not be used to register singletons.
- Specified by:
registerAtRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The object for which we construct and register an MBean.name
- The name of the MBean.- Returns:
- The MBean constructed from obj.
-
registerAtRoot
public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation. Exactly the same as mom.register( mom.getRoot(), obj ).This version of register should also be used to register singletons.
- Specified by:
registerAtRoot
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The managed object we are registering.- Returns:
- The MBean constructed from obj.
-
unregister
public void unregister(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Unregister the Open MBean corresponding to obj from the mbean server.Must be called after a successful createRoot call.
- Specified by:
unregister
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The object originally passed to a register method.
-
getObjectName
public ObjectName getObjectName(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Get the ObjectName for the given object (which must have been registered via a register call).Must be called after a successful createRoot call.
- Specified by:
getObjectName
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The object originally passed to a register call.- Returns:
- The ObjectName used to register the MBean.
-
getAMXClient
public org.glassfish.gmbal.AMXClient getAMXClient(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom.Must be called after a successful createRoot call.
- Specified by:
getAMXClient
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The object corresponding to an MBean.- Returns:
- An AMXClient that acts as a proxy for this MBean.
-
getObject
public Object getObject(ObjectName oname)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Get the Object that was registered with the given ObjectName. Note that getObject and getObjectName are inverse operations.Must be called after a successful createRoot call.
- Specified by:
getObject
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
oname
- The ObjectName used to register the object.- Returns:
- The Object passed to the register call.
-
stripPrefix
public void stripPrefix(String... str)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Add a type prefix to strip from type names, to shorten the names for a better presentation to the user. This may only be called before a createRot method is called.- Specified by:
stripPrefix
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
str
- Class package name to strip from type name.
-
stripPackagePrefix
public void stripPackagePrefix()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name. Otherwise, the full Class name is the type.- Specified by:
stripPackagePrefix
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getDomain
public String getDomain()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Return the domain name that was used when this ManagedObjectManager was created. This is the JMX domain that will be used in all ObjectNames created by this ManagedObjectManager.May be called at any time.
- Specified by:
getDomain
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Returns:
- Get the domain name for this ManagedObjectManager.
-
setMBeanServer
public void setMBeanServer(MBeanServer server)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Set the MBeanServer to which all MBeans using this interface are published. The default value is java.lang.management.ManagementFactory.getPlatformMBeanServer().Must be called before a successful createRoot call.
- Specified by:
setMBeanServer
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
server
- The MBeanServer to set as the MBeanServer for this ManagedObjectManager.
-
getMBeanServer
public MBeanServer getMBeanServer()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Get the current MBeanServer.May be called at any time.
- Specified by:
getMBeanServer
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Returns:
- The current MBeanServer, either the default, or the value passed to setMBeanServer.
-
setResourceBundle
public void setResourceBundle(ResourceBundle rb)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Set the ResourceBundle to use for getting localized descriptions. If not set, the description is the value in the annotation.Must be called before a successful call to a createRoot method.
- Specified by:
setResourceBundle
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
rb
- The resource bundle to use. May be null.
-
getResourceBundle
public ResourceBundle getResourceBundle()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Get the resource bundle (if any) set by setResourceBundle.May be called at any time.
- Specified by:
getResourceBundle
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Returns:
- The resource bundle set by setResourceBundle: may be null.
-
addAnnotation
public void addAnnotation(AnnotatedElement element, Annotation annotation)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Method to add an annotation to an element that cannot be modified. This is typically needed when dealing with an implementation of an interface that is part of a standardized API, and so the interface cannot be annotated by modifiying the source code. In some cases the implementation of the interface also cannot be inherited, because the implementation is generated by a standardized code generator. Another possibility is that there are several different implementations of the standardized interface, and it is undesirable to annotate each implementation with @InheritedAttributes.- Specified by:
addAnnotation
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
element
- The annotated element (class or method for our purposes).annotation
- The annotation we wish to add to the element.
-
addInheritedAnnotations
public void addInheritedAnnotations(Class<?> cls)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Add all annotations for this class as if they were declared on the inheritance parent(s) of the class (immediate superclass for a class, all immediate superinterfaces for an interface). Also add all method annotations for methods that override an inherited method. This acts as if all annotations on cls were actually applied to the immediate super class or interface.- Specified by:
addInheritedAnnotations
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
cls
- Class to analyze for inherited annotations.
-
setRegistrationDebug
public void setRegistrationDebug(org.glassfish.gmbal.ManagedObjectManager.RegistrationDebugLevel level)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Print debug output to System.out.May be called at any time.
- Specified by:
setRegistrationDebug
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
level
- NONE is no debugging at all, NORMAL traces high-level construction of skeletons and type converters, and dumps results of new skeletons and type converters, FINE traces everything in great detail. The tracing is done with INFO-level logger calls. The logger name is that package name (org.glassfish.gmbal.impl).
-
setRuntimeDebug
public void setRuntimeDebug(boolean flag)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger.May be called at any time.
- Specified by:
setRuntimeDebug
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
flag
- true to enable runtime debug, false to disable.
-
setTypelibDebug
public void setTypelibDebug(int level)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Enabled generation of debug log for type evaluator debugging. This happens as part of the registration process for the first time a particular class is processed.May be called at any time.
- Specified by:
setTypelibDebug
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
level
- set to 1 to just see the results of the TypeEvaluator, >1 to see lots of details. WARNING: values >1 will result in a large amount of output.
-
setJMXRegistrationDebug
public void setJMXRegistrationDebug(boolean flag)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Set debugging for JMX registrations. If true, all registrations and deregistrations with the MBeanServer are traced.- Specified by:
setJMXRegistrationDebug
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
flag
- True to enalbed registration tracing.
-
dumpSkeleton
public String dumpSkeleton(Object obj)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Dump the skeleton used in the implementation of the MBean for obj. Obj must be currently registered.Must be called after a successful call to a createRoot method.
- Specified by:
dumpSkeleton
in interfaceorg.glassfish.gmbal.ManagedObjectManager
- Parameters:
obj
- The registered object whose skeleton should be displayed.- Returns:
- The string representation of the skeleton.
-
suppressDuplicateRootReport
public void suppressDuplicateRootReport(boolean suppressReport)
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Suppress reporting of a duplicate root name. If this option is enabled, createRoot( Object ) and createRoot( Object, String ) will return null for a duplicate root name, otherwise a Gmbal error will be reported. Note that this applies ONLY to createRoot: the register methods are unaffected. Also note that any other errors that might occur on createRoot will be reported normally.Must be called before a successful call to a createRoot method.
- Specified by:
suppressDuplicateRootReport
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
equalsProxiedInstance
public boolean equalsProxiedInstance(WSEndpoint endpoint)
Description copied from class:WSEndpoint
Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.- Overrides:
equalsProxiedInstance
in classWSEndpoint
- Returns:
- true if the proxied endpoint instance held by this instance equals to 'endpoint', otherwise return false.
-
createCodec
public Codec createCodec()
Description copied from class:WSEndpoint
Gets the Endpoint's codec that is used to encode/decodeMessage
s. This is a copy of the master codec and it shouldn't be shared across two requests running concurrently(unless it is stateless).- Specified by:
createCodec
in classWSEndpoint
- Returns:
- codec to encode/decode
-
getServiceName
public QName getServiceName()
Description copied from class:WSEndpoint
Gets the application endpoint's serviceName. It could be got from DD or annotations- Specified by:
getServiceName
in classWSEndpoint
- Returns:
- same as wsdl:service QName if WSDL exists or generated
-
getPortName
public QName getPortName()
Description copied from class:WSEndpoint
Gets the application endpoint's portName. It could be got from DD or annotations- Specified by:
getPortName
in classWSEndpoint
- Returns:
- same as wsdl:port QName if WSDL exists or generated
-
getImplementationClass
public Class getImplementationClass()
Description copied from class:WSEndpoint
Gets the application endpointClass
that eventually serves the request.This is the same value given to the
WSEndpoint.create(java.lang.Class<T>, boolean, com.sun.xml.ws.api.server.Invoker, javax.xml.namespace.QName, javax.xml.namespace.QName, com.sun.xml.ws.api.server.Container, com.sun.xml.ws.api.WSBinding, com.sun.xml.ws.api.server.SDDocumentSource, java.util.Collection<? extends com.sun.xml.ws.api.server.SDDocumentSource>, org.xml.sax.EntityResolver, boolean)
method.- Specified by:
getImplementationClass
in classWSEndpoint
-
getBinding
public WSBinding getBinding()
Description copied from class:WSEndpoint
Represents the binding for which thisWSEndpoint
is created for.- Specified by:
getBinding
in classWSEndpoint
- Returns:
- always same object.
-
getContainer
public Container getContainer()
Description copied from class:WSEndpoint
Gets theContainer
object.The components inside
WSEndpoint
uses this reference to communicate with the hosting environment.- Specified by:
getContainer
in classWSEndpoint
- Returns:
- always same object. If no "real"
Container
instance is given,Container.NONE
will be returned.
-
getPort
public WSDLPort getPort()
Description copied from class:WSEndpoint
Gets the port that this endpoint is serving.A service is not required to have a WSDL, and when it doesn't, this method returns null. Otherwise it returns an object that describes the port that this
WSEndpoint
is serving.- Specified by:
getPort
in classWSEndpoint
- Returns:
- Possibly null, but always the same value.
-
setExecutor
public void setExecutor(Executor exec)
Description copied from class:WSEndpoint
Set thisExecutor
to run asynchronous requests using this executor. This executor is set onEngine
and must be set before callingWSEndpoint.schedule(Packet,CompletionCallback)
andWSEndpoint.schedule(Packet,CompletionCallback,FiberContextSwitchInterceptor)
methods.- Specified by:
setExecutor
in classWSEndpoint
- Parameters:
exec
- Executor to run async requests
-
schedule
public void schedule(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)
Description copied from class:WSEndpoint
Schedule invocation of web service asynchronously.- Specified by:
schedule
in classWSEndpoint
- Parameters:
request
- web service requestcallback
- callback to get response packet(exception if there is one)interceptor
- caller's interceptor to impose a context of execution- See Also:
WSEndpoint.schedule(Packet, CompletionCallback)
-
createPipeHead
public WSEndpoint.PipeHead createPipeHead()
Description copied from class:WSEndpoint
Creates a newWSEndpoint.PipeHead
to process incoming requests.This is not a cheap operation. The caller is expected to reuse the returned
WSEndpoint.PipeHead
. Seeclass javadoc
for details.- Specified by:
createPipeHead
in classWSEndpoint
- Returns:
- A newly created
WSEndpoint.PipeHead
that's ready to serve.
-
dispose
public void dispose()
Description copied from class:WSEndpoint
Indicates that theWSEndpoint
is about to be turned off, and will no longer serve any packet anymore.This method needs to be invoked for the JAX-WS RI to correctly implement some of the spec semantics (TODO: pointer.) It's the responsibility of the code that hosts a
WSEndpoint
to invoke this method.Once this method is called, the behavior is undefed for all in-progress
WSEndpoint.PipeHead.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.api.server.WebServiceContextDelegate, com.sun.xml.ws.api.server.TransportBackChannel)
methods (by other threads) and futureWSEndpoint.PipeHead.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.api.server.WebServiceContextDelegate, com.sun.xml.ws.api.server.TransportBackChannel)
method invocations.- Specified by:
dispose
in classWSEndpoint
-
getServiceDefinition
public ServiceDefinition getServiceDefinition()
Description copied from class:WSEndpoint
Gets the description of the service.A description is a set of WSDL/schema and other documents that together describes a service. A service is not required to have a description, and when it doesn't, this method returns null.
- Specified by:
getServiceDefinition
in classWSEndpoint
- Returns:
- Possibly null, always the same value under ordinary circumstances but may change if the endpoint is managed.
-
getComponentRegistry
public Set getComponentRegistry()
Description copied from class:WSEndpoint
Gets the list ofEndpointComponent
that are associated with this endpoint.Components (such as codec, tube, handler, etc) who wish to provide some service to other components in the endpoint can iterate the registry and call its
EndpointComponent.getSPI(Class)
to establish a private contract between components.Components who wish to subscribe to such a service can add itself to this set.
- Specified by:
getComponentRegistry
in classWSEndpoint
- Returns:
- always return the same set.
-
getSEIModel
public SEIModel getSEIModel()
Description copied from class:WSEndpoint
Gets theSEIModel
that represents the relationship between WSDL and Java SEI.This method returns a non-null value if and only if this endpoint is ultimately serving an application through an SEI.
- Specified by:
getSEIModel
in classWSEndpoint
- Returns:
- maybe null. See above for more discussion. Always the same value.
-
getPolicyMap
public PolicyMap getPolicyMap()
Description copied from class:WSEndpoint
Gives the PolicMap that captures the Policy for the endpoint- Specified by:
getPolicyMap
in classWSEndpoint
- Returns:
- PolicyMap
-
closeManagedObjectManager
public void closeManagedObjectManager()
Description copied from class:WSEndpoint
Close the ManagedObjectManager for this endpoint. This is used by the Web Service Configuration Management system so that it closes the MOM before it creates a new WSEndpoint. Then it calls dispose on the existing endpoint and then installs the new endpoint. The call to dispose also calls closeManagedObjectManager, but is a noop if that method has already been called.- Specified by:
closeManagedObjectManager
in classWSEndpoint
-
getAssemblerContext
public ServerTubeAssemblerContext getAssemblerContext()
Description copied from class:WSEndpoint
This is only needed to expose info for monitoring.- Specified by:
getAssemblerContext
in classWSEndpoint
-
getEndpointReference
public jakarta.xml.ws.EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters)
Description copied from class:WSEndpoint
Return EndpointReference instance, based on passed parameters and spec version represented by clazz- Specified by:
getEndpointReference
in classWSEndpoint
- Parameters:
clazz
- represents spec versionaddress
- endpoint addresswsdlAddress
- wsdl addressreferenceParameters
- any reference parameters to be added to the instance- Returns:
- EndpointReference instance based on passed parameters and values obtained from current instance
-
getEndpointReference
public jakarta.xml.ws.EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, List metadata, List referenceParameters)
- Specified by:
getEndpointReference
in classWSEndpoint
- Returns:
- EndpointReference instance based on passed parameters and values obtained from current instance
-
getOperationDispatcher
public OperationDispatcher getOperationDispatcher()
Description copied from class:WSEndpoint
Nullable when there is no associated WSDL Model- Specified by:
getOperationDispatcher
in classWSEndpoint
- Returns:
-
createServiceResponseForException
public Packet createServiceResponseForException(ThrowableContainerPropertySet tc, Packet responsePacket, SOAPVersion soapVersion, WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding)
Description copied from class:WSEndpoint
This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.- Specified by:
createServiceResponseForException
in classWSEndpoint
-
getObjectRegistrationManager
public org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManager getObjectRegistrationManager()
Description copied from interface:org.glassfish.gmbal.ManagedObjectManager
Return an ObjectRegistrationManager as required in the pfl timer services.Can be called at any time.
- Specified by:
getObjectRegistrationManager
in interfaceorg.glassfish.gmbal.ManagedObjectManager
-
-