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
ManagedObjectManagerproxy class forWSEndpointImplinstances 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 fromManagedObjectManageris 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 voidaddAnnotation(AnnotatedElement element, Annotation annotation)voidaddInheritedAnnotations(Class<?> cls)voidclose()voidcloseManagedObjectManager()Close the ManagedObjectManager for this endpoint.CodeccreateCodec()Gets the Endpoint's codec that is used to encode/decodeMessages.WSEndpoint.PipeHeadcreatePipeHead()Creates a newWSEndpoint.PipeHeadto process incoming requests.org.glassfish.gmbal.GmbalMBeancreateRoot()org.glassfish.gmbal.GmbalMBeancreateRoot(Object root)org.glassfish.gmbal.GmbalMBeancreateRoot(Object root, String name)PacketcreateServiceResponseForException(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.voiddispose()Indicates that theWSEndpointis about to be turned off, and will no longer serve any packet anymore.StringdumpSkeleton(Object obj)booleanequalsProxiedInstance(WSEndpoint endpoint)Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.org.glassfish.gmbal.AMXClientgetAMXClient(Object obj)ServerTubeAssemblerContextgetAssemblerContext()This is only needed to expose info for monitoring.WSBindinggetBinding()Represents the binding for which thisWSEndpointis created for.ContainergetContainer()Gets theContainerobject.StringgetDomain()jakarta.xml.ws.EndpointReferencegetEndpointReference(Class clazz, String address, String wsdlAddress, List metadata, List referenceParameters)jakarta.xml.ws.EndpointReferencegetEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters)Return EndpointReference instance, based on passed parameters and spec version represented by clazzClassgetImplementationClass()Gets the application endpointClassthat eventually serves the request.org.glassfish.gmbal.ManagedObjectManagergetManagedObjectManager()Returns a real instance ofManagedObjectManagerMBeanServergetMBeanServer()ObjectgetObject(ObjectName oname)ObjectNamegetObjectName(Object obj)org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManagergetObjectRegistrationManager()OperationDispatchergetOperationDispatcher()Nullable when there is no associated WSDL ModelPolicyMapgetPolicyMap()Gives the PolicMap that captures the Policy for the endpointWSDLPortgetPort()Gets the port that this endpoint is serving.QNamegetPortName()Gets the application endpoint's portName.ResourceBundlegetResourceBundle()ObjectgetRoot()SEIModelgetSEIModel()Gets theSEIModelthat represents the relationship between WSDL and Java SEI.ServiceDefinitiongetServiceDefinition()Gets the description of the service.QNamegetServiceName()Gets the application endpoint's serviceName.WSEndpointImplgetWsEndpoint()booleanisInitialized()Returnstrueif this proxy contains a reference to real ManagedObjectManager instance,falseotherwise.booleanisManagedObject(Object obj)org.glassfish.gmbal.GmbalMBeanregister(Object parent, Object obj)org.glassfish.gmbal.GmbalMBeanregister(Object parent, Object obj, String name)org.glassfish.gmbal.GmbalMBeanregisterAtRoot(Object obj)org.glassfish.gmbal.GmbalMBeanregisterAtRoot(Object obj, String name)voidresumeJMXRegistration()voidschedule(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)Schedule invocation of web service asynchronously.voidsetExecutor(Executor exec)Set thisExecutorto run asynchronous requests using this executor.voidsetJMXRegistrationDebug(boolean flag)voidsetMBeanServer(MBeanServer server)voidsetRegistrationDebug(org.glassfish.gmbal.ManagedObjectManager.RegistrationDebugLevel level)voidsetResourceBundle(ResourceBundle rb)voidsetRuntimeDebug(boolean flag)voidsetTypelibDebug(int level)voidstripPackagePrefix()voidstripPrefix(String... str)voidsuppressDuplicateRootReport(boolean suppressReport)voidsuspendJMXRegistration()voidunregister(Object obj)-
Methods inherited from class com.sun.xml.ws.api.server.WSEndpoint
create, create, create, create, getBoundEndpoints, getComponentRegistry, 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:
getManagedObjectManagerin classWSEndpoint- Returns:
- an ManagedObjectManager instance
-
isInitialized
public boolean isInitialized()
Returnstrueif this proxy contains a reference to real ManagedObjectManager instance,falseotherwise.- Returns:
trueif ManagedObjectManager has been created,falseotherwise.
-
getWsEndpoint
public WSEndpointImpl getWsEndpoint()
-
suspendJMXRegistration
public void suspendJMXRegistration()
- Specified by:
suspendJMXRegistrationin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
resumeJMXRegistration
public void resumeJMXRegistration()
- Specified by:
resumeJMXRegistrationin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
isManagedObject
public boolean isManagedObject(Object obj)
- Specified by:
isManagedObjectin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot()
- Specified by:
createRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot(Object root)
- Specified by:
createRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
createRoot
public org.glassfish.gmbal.GmbalMBean createRoot(Object root, String name)
- Specified by:
createRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getRoot
public Object getRoot()
- Specified by:
getRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
register
public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj, String name)
- Specified by:
registerin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
register
public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj)
- Specified by:
registerin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
registerAtRoot
public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj, String name)
- Specified by:
registerAtRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
registerAtRoot
public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj)
- Specified by:
registerAtRootin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
unregister
public void unregister(Object obj)
- Specified by:
unregisterin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getObjectName
public ObjectName getObjectName(Object obj)
- Specified by:
getObjectNamein interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getAMXClient
public org.glassfish.gmbal.AMXClient getAMXClient(Object obj)
- Specified by:
getAMXClientin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getObject
public Object getObject(ObjectName oname)
- Specified by:
getObjectin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
stripPrefix
public void stripPrefix(String... str)
- Specified by:
stripPrefixin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
stripPackagePrefix
public void stripPackagePrefix()
- Specified by:
stripPackagePrefixin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getDomain
public String getDomain()
- Specified by:
getDomainin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setMBeanServer
public void setMBeanServer(MBeanServer server)
- Specified by:
setMBeanServerin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getMBeanServer
public MBeanServer getMBeanServer()
- Specified by:
getMBeanServerin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setResourceBundle
public void setResourceBundle(ResourceBundle rb)
- Specified by:
setResourceBundlein interfaceorg.glassfish.gmbal.ManagedObjectManager
-
getResourceBundle
public ResourceBundle getResourceBundle()
- Specified by:
getResourceBundlein interfaceorg.glassfish.gmbal.ManagedObjectManager
-
addAnnotation
public void addAnnotation(AnnotatedElement element, Annotation annotation)
- Specified by:
addAnnotationin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
addInheritedAnnotations
public void addInheritedAnnotations(Class<?> cls)
- Specified by:
addInheritedAnnotationsin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setRegistrationDebug
public void setRegistrationDebug(org.glassfish.gmbal.ManagedObjectManager.RegistrationDebugLevel level)
- Specified by:
setRegistrationDebugin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setRuntimeDebug
public void setRuntimeDebug(boolean flag)
- Specified by:
setRuntimeDebugin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setTypelibDebug
public void setTypelibDebug(int level)
- Specified by:
setTypelibDebugin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
setJMXRegistrationDebug
public void setJMXRegistrationDebug(boolean flag)
- Specified by:
setJMXRegistrationDebugin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
dumpSkeleton
public String dumpSkeleton(Object obj)
- Specified by:
dumpSkeletonin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
suppressDuplicateRootReport
public void suppressDuplicateRootReport(boolean suppressReport)
- Specified by:
suppressDuplicateRootReportin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
equalsProxiedInstance
public boolean equalsProxiedInstance(WSEndpoint endpoint)
Description copied from class:WSEndpointUsed for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.- Overrides:
equalsProxiedInstancein 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:WSEndpointGets the Endpoint's codec that is used to encode/decodeMessages. 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:
createCodecin classWSEndpoint- Returns:
- codec to encode/decode
-
getServiceName
public QName getServiceName()
Description copied from class:WSEndpointGets the application endpoint's serviceName. It could be got from DD or annotations- Specified by:
getServiceNamein classWSEndpoint- Returns:
- same as wsdl:service QName if WSDL exists or generated
-
getPortName
public QName getPortName()
Description copied from class:WSEndpointGets the application endpoint's portName. It could be got from DD or annotations- Specified by:
getPortNamein classWSEndpoint- Returns:
- same as wsdl:port QName if WSDL exists or generated
-
getImplementationClass
public Class getImplementationClass()
Description copied from class:WSEndpointGets the application endpointClassthat 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:
getImplementationClassin classWSEndpoint
-
getBinding
public WSBinding getBinding()
Description copied from class:WSEndpointRepresents the binding for which thisWSEndpointis created for.- Specified by:
getBindingin classWSEndpoint- Returns:
- always same object.
-
getContainer
public Container getContainer()
Description copied from class:WSEndpointGets theContainerobject.The components inside
WSEndpointuses this reference to communicate with the hosting environment.- Specified by:
getContainerin classWSEndpoint- Returns:
- always same object. If no "real"
Containerinstance is given,Container.NONEwill be returned.
-
getPort
public WSDLPort getPort()
Description copied from class:WSEndpointGets 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
WSEndpointis serving.- Specified by:
getPortin classWSEndpoint- Returns:
- Possibly null, but always the same value.
-
setExecutor
public void setExecutor(Executor exec)
Description copied from class:WSEndpointSet thisExecutorto run asynchronous requests using this executor. This executor is set onEngineand must be set before callingWSEndpoint.schedule(Packet,CompletionCallback)andWSEndpoint.schedule(Packet,CompletionCallback,FiberContextSwitchInterceptor)methods.- Specified by:
setExecutorin classWSEndpoint- Parameters:
exec- Executor to run async requests
-
schedule
public void schedule(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)
Description copied from class:WSEndpointSchedule invocation of web service asynchronously.- Specified by:
schedulein 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:WSEndpointCreates a newWSEndpoint.PipeHeadto process incoming requests.This is not a cheap operation. The caller is expected to reuse the returned
WSEndpoint.PipeHead. Seeclass javadocfor details.- Specified by:
createPipeHeadin classWSEndpoint- Returns:
- A newly created
WSEndpoint.PipeHeadthat's ready to serve.
-
dispose
public void dispose()
Description copied from class:WSEndpointIndicates that theWSEndpointis 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
WSEndpointto 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:
disposein classWSEndpoint
-
getServiceDefinition
public ServiceDefinition getServiceDefinition()
Description copied from class:WSEndpointGets 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:
getServiceDefinitionin classWSEndpoint- Returns:
- Possibly null, always the same value under ordinary circumstances but may change if the endpoint is managed.
-
getSEIModel
public SEIModel getSEIModel()
Description copied from class:WSEndpointGets theSEIModelthat 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:
getSEIModelin classWSEndpoint- Returns:
- maybe null. See above for more discussion. Always the same value.
-
getPolicyMap
public PolicyMap getPolicyMap()
Description copied from class:WSEndpointGives the PolicMap that captures the Policy for the endpoint- Specified by:
getPolicyMapin classWSEndpoint- Returns:
- PolicyMap
-
closeManagedObjectManager
public void closeManagedObjectManager()
Description copied from class:WSEndpointClose 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:
closeManagedObjectManagerin classWSEndpoint
-
getAssemblerContext
public ServerTubeAssemblerContext getAssemblerContext()
Description copied from class:WSEndpointThis is only needed to expose info for monitoring.- Specified by:
getAssemblerContextin classWSEndpoint
-
getEndpointReference
public jakarta.xml.ws.EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters)
Description copied from class:WSEndpointReturn EndpointReference instance, based on passed parameters and spec version represented by clazz- Specified by:
getEndpointReferencein 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:
getEndpointReferencein classWSEndpoint- Returns:
- EndpointReference instance based on passed parameters and values obtained from current instance
-
getOperationDispatcher
public OperationDispatcher getOperationDispatcher()
Description copied from class:WSEndpointNullable when there is no associated WSDL Model- Specified by:
getOperationDispatcherin classWSEndpoint- Returns:
-
createServiceResponseForException
public Packet createServiceResponseForException(ThrowableContainerPropertySet tc, Packet responsePacket, SOAPVersion soapVersion, WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding)
Description copied from class:WSEndpointThis is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.- Specified by:
createServiceResponseForExceptionin classWSEndpoint
-
getObjectRegistrationManager
public org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManager getObjectRegistrationManager()
- Specified by:
getObjectRegistrationManagerin interfaceorg.glassfish.gmbal.ManagedObjectManager
-
-