Class WSEndpointMOMProxy<T>

java.lang.Object
com.sun.xml.ws.api.server.WSEndpoint<T>
com.sun.xml.ws.server.WSEndpointMOMProxy<T>
All Implemented Interfaces:
Component, ComponentRegistry, Closeable, AutoCloseable, org.glassfish.gmbal.ManagedObjectManager

public class WSEndpointMOMProxy<T> extends WSEndpoint<T> implements org.glassfish.gmbal.ManagedObjectManager
ManagedObjectManager proxy class for WSEndpointImpl 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 from ManagedObjectManager 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.
  • Method Details

    • getManagedObjectManager

      public org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
      Returns a real instance of ManagedObjectManager
      Specified by:
      getManagedObjectManager in class WSEndpoint<T>
      Returns:
      an ManagedObjectManager instance
    • isInitialized

      public boolean isInitialized()
      Returns true if this proxy contains a reference to real ManagedObjectManager instance, false otherwise.
      Returns:
      true if ManagedObjectManager has been created, false otherwise.
    • getWsEndpoint

      public WSEndpointImpl<T> getWsEndpoint()
    • suspendJMXRegistration

      public void suspendJMXRegistration()
      Specified by:
      suspendJMXRegistration in interface org.glassfish.gmbal.ManagedObjectManager
    • resumeJMXRegistration

      public void resumeJMXRegistration()
      Specified by:
      resumeJMXRegistration in interface org.glassfish.gmbal.ManagedObjectManager
    • isManagedObject

      public boolean isManagedObject(Object obj)
      Specified by:
      isManagedObject in interface org.glassfish.gmbal.ManagedObjectManager
    • createRoot

      public org.glassfish.gmbal.GmbalMBean createRoot()
      Specified by:
      createRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • createRoot

      public org.glassfish.gmbal.GmbalMBean createRoot(Object root)
      Specified by:
      createRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • createRoot

      public org.glassfish.gmbal.GmbalMBean createRoot(Object root, String name)
      Specified by:
      createRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • getRoot

      public Object getRoot()
      Specified by:
      getRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • register

      public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj, String name)
      Specified by:
      register in interface org.glassfish.gmbal.ManagedObjectManager
    • register

      public org.glassfish.gmbal.GmbalMBean register(Object parent, Object obj)
      Specified by:
      register in interface org.glassfish.gmbal.ManagedObjectManager
    • registerAtRoot

      public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj, String name)
      Specified by:
      registerAtRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • registerAtRoot

      public org.glassfish.gmbal.GmbalMBean registerAtRoot(Object obj)
      Specified by:
      registerAtRoot in interface org.glassfish.gmbal.ManagedObjectManager
    • unregister

      public void unregister(Object obj)
      Specified by:
      unregister in interface org.glassfish.gmbal.ManagedObjectManager
    • getObjectName

      public ObjectName getObjectName(Object obj)
      Specified by:
      getObjectName in interface org.glassfish.gmbal.ManagedObjectManager
    • getAMXClient

      public org.glassfish.gmbal.AMXClient getAMXClient(Object obj)
      Specified by:
      getAMXClient in interface org.glassfish.gmbal.ManagedObjectManager
    • getObject

      public Object getObject(ObjectName oname)
      Specified by:
      getObject in interface org.glassfish.gmbal.ManagedObjectManager
    • stripPrefix

      public void stripPrefix(String... str)
      Specified by:
      stripPrefix in interface org.glassfish.gmbal.ManagedObjectManager
    • stripPackagePrefix

      public void stripPackagePrefix()
      Specified by:
      stripPackagePrefix in interface org.glassfish.gmbal.ManagedObjectManager
    • getDomain

      public String getDomain()
      Specified by:
      getDomain in interface org.glassfish.gmbal.ManagedObjectManager
    • setMBeanServer

      public void setMBeanServer(MBeanServer server)
      Specified by:
      setMBeanServer in interface org.glassfish.gmbal.ManagedObjectManager
    • getMBeanServer

      public MBeanServer getMBeanServer()
      Specified by:
      getMBeanServer in interface org.glassfish.gmbal.ManagedObjectManager
    • setResourceBundle

      public void setResourceBundle(ResourceBundle rb)
      Specified by:
      setResourceBundle in interface org.glassfish.gmbal.ManagedObjectManager
    • getResourceBundle

      public ResourceBundle getResourceBundle()
      Specified by:
      getResourceBundle in interface org.glassfish.gmbal.ManagedObjectManager
    • addAnnotation

      public void addAnnotation(AnnotatedElement element, Annotation annotation)
      Specified by:
      addAnnotation in interface org.glassfish.gmbal.ManagedObjectManager
    • addInheritedAnnotations

      public void addInheritedAnnotations(Class<?> cls)
      Specified by:
      addInheritedAnnotations in interface org.glassfish.gmbal.ManagedObjectManager
    • setRegistrationDebug

      public void setRegistrationDebug(org.glassfish.gmbal.ManagedObjectManager.RegistrationDebugLevel level)
      Specified by:
      setRegistrationDebug in interface org.glassfish.gmbal.ManagedObjectManager
    • setRuntimeDebug

      public void setRuntimeDebug(boolean flag)
      Specified by:
      setRuntimeDebug in interface org.glassfish.gmbal.ManagedObjectManager
    • setTypelibDebug

      public void setTypelibDebug(int level)
      Specified by:
      setTypelibDebug in interface org.glassfish.gmbal.ManagedObjectManager
    • setJMXRegistrationDebug

      public void setJMXRegistrationDebug(boolean flag)
      Specified by:
      setJMXRegistrationDebug in interface org.glassfish.gmbal.ManagedObjectManager
    • dumpSkeleton

      public String dumpSkeleton(Object obj)
      Specified by:
      dumpSkeleton in interface org.glassfish.gmbal.ManagedObjectManager
    • suppressDuplicateRootReport

      public void suppressDuplicateRootReport(boolean suppressReport)
      Specified by:
      suppressDuplicateRootReport in interface org.glassfish.gmbal.ManagedObjectManager
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      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 class WSEndpoint<T>
      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/decode Messages. 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 class WSEndpoint<T>
      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 class WSEndpoint<T>
      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 class WSEndpoint<T>
      Returns:
      same as wsdl:port QName if WSDL exists or generated
    • getImplementationClass

      public Class<T> getImplementationClass()
      Description copied from class: WSEndpoint
      Specified by:
      getImplementationClass in class WSEndpoint<T>
    • getBinding

      public WSBinding getBinding()
      Description copied from class: WSEndpoint
      Represents the binding for which this WSEndpoint is created for.
      Specified by:
      getBinding in class WSEndpoint<T>
      Returns:
      always same object.
    • getContainer

      public Container getContainer()
      Description copied from class: WSEndpoint
      Gets the Container object.

      The components inside WSEndpoint uses this reference to communicate with the hosting environment.

      Specified by:
      getContainer in class WSEndpoint<T>
      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 class WSEndpoint<T>
      Returns:
      Possibly null, but always the same value.
    • setExecutor

      public void setExecutor(Executor exec)
      Description copied from class: WSEndpoint
      Set this Executor to run asynchronous requests using this executor. This executor is set on Engine and must be set before calling WSEndpoint.schedule(Packet,CompletionCallback) and WSEndpoint.schedule(Packet,CompletionCallback,FiberContextSwitchInterceptor) methods.
      Specified by:
      setExecutor in class WSEndpoint<T>
      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 class WSEndpoint<T>
      Parameters:
      request - web service request
      callback - callback to get response packet(exception if there is one)
      interceptor - caller's interceptor to impose a context of execution
      See Also:
    • createPipeHead

      public WSEndpoint.PipeHead createPipeHead()
      Description copied from class: WSEndpoint
      Creates a new WSEndpoint.PipeHead to process incoming requests.

      This is not a cheap operation. The caller is expected to reuse the returned WSEndpoint.PipeHead. See class javadoc for details.

      Specified by:
      createPipeHead in class WSEndpoint<T>
      Returns:
      A newly created WSEndpoint.PipeHead that's ready to serve.
    • dispose

      public void dispose()
      Description copied from class: WSEndpoint
      Indicates that the WSEndpoint 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 future WSEndpoint.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 class WSEndpoint<T>
    • 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 class WSEndpoint<T>
      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: WSEndpoint
      Gets the SEIModel 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 class WSEndpoint<T>
      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 class WSEndpoint<T>
      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 class WSEndpoint<T>
    • getAssemblerContext

      public ServerTubeAssemblerContext getAssemblerContext()
      Description copied from class: WSEndpoint
      This is only needed to expose info for monitoring.
      Specified by:
      getAssemblerContext in class WSEndpoint<T>
    • getEndpointReference

      public <T extends jakarta.xml.ws.EndpointReference> T getEndpointReference(Class<T> 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 class WSEndpoint<T>
      Parameters:
      clazz - represents spec version
      address - endpoint address
      wsdlAddress - wsdl address
      referenceParameters - any reference parameters to be added to the instance
      Returns:
      EndpointReference instance based on passed parameters and values obtained from current instance
    • getEndpointReference

      public <T extends jakarta.xml.ws.EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters)
      Specified by:
      getEndpointReference in class WSEndpoint<T>
      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 class WSEndpoint<T>
    • 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 class WSEndpoint<T>
    • getObjectRegistrationManager

      public org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManager getObjectRegistrationManager()
      Specified by:
      getObjectRegistrationManager in interface org.glassfish.gmbal.ManagedObjectManager