Class WSEndpoint<T>

    • Constructor Detail

      • WSEndpoint

        public WSEndpoint()
    • Method Detail

      • createCodec

        @NotNull
        public abstract Codec createCodec()
        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).
        Returns:
        codec to encode/decode
      • getServiceName

        @NotNull
        public abstract QName getServiceName()
        Gets the application endpoint's serviceName. It could be got from DD or annotations
        Returns:
        same as wsdl:service QName if WSDL exists or generated
      • getPortName

        @NotNull
        public abstract QName getPortName()
        Gets the application endpoint's portName. It could be got from DD or annotations
        Returns:
        same as wsdl:port QName if WSDL exists or generated
      • getBinding

        @NotNull
        public abstract WSBinding getBinding()
        Represents the binding for which this WSEndpoint is created for.
        Returns:
        always same object.
      • getContainer

        @NotNull
        public abstract Container getContainer()
        Gets the Container object.

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

        Returns:
        always same object. If no "real" Container instance is given, Container.NONE will be returned.
      • getPort

        @Nullable
        public abstract WSDLPort getPort()
        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.

        Returns:
        Possibly null, but always the same value.
      • getEngine

        public Engine getEngine()
        Returns Engine for this endpoint
        Returns:
        Engine
      • getServiceDefinition

        @Nullable
        public abstract ServiceDefinition getServiceDefinition()
        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.

        Returns:
        Possibly null, always the same value under ordinary circumstances but may change if the endpoint is managed.
      • getBoundEndpoints

        public List<BoundEndpoint> getBoundEndpoints()
        Gets the list of BoundEndpoint that are associated with this endpoint.
        Returns:
        always return the same set.
      • getComponentRegistry

        @NotNull
        public abstract Set<EndpointComponent> getComponentRegistry()
        Deprecated.
        Gets the list of EndpointComponent 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.

        Returns:
        always return the same set.
      • getSPI

        @Nullable
        public <S> S getSPI​(@NotNull
                            Class<S> spiType)
        Description copied from interface: Component
        Gets the specified SPI.

        This method works as a kind of directory service for SPIs, allowing various components to define private contract and talk to each other.

        Specified by:
        getSPI in interface Component
        Returns:
        null if such an SPI is not provided by this object.
      • getSEIModel

        @Nullable
        public abstract SEIModel getSEIModel()
        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.

        Returns:
        maybe null. See above for more discussion. Always the same value.
      • getPolicyMap

        public abstract PolicyMap getPolicyMap()
        Deprecated.
        Do not use this method as the PolicyMap API is not final yet and might change in next few months.
        Gives the PolicMap that captures the Policy for the endpoint
        Returns:
        PolicyMap
      • getManagedObjectManager

        @NotNull
        public abstract org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
        Get the ManagedObjectManager for this endpoint.
      • closeManagedObjectManager

        public abstract void closeManagedObjectManager()
        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.
      • getAssemblerContext

        @NotNull
        public abstract ServerTubeAssemblerContext getAssemblerContext()
        This is only needed to expose info for monitoring.
      • create

        public static <T> WSEndpoint<T> create​(@NotNull
                                               Class<T> implType,
                                               boolean processHandlerAnnotation,
                                               @Nullable
                                               Invoker invoker,
                                               @Nullable
                                               QName serviceName,
                                               @Nullable
                                               QName portName,
                                               @Nullable
                                               Container container,
                                               @Nullable
                                               WSBinding binding,
                                               @Nullable
                                               SDDocumentSource primaryWsdl,
                                               @Nullable
                                               Collection<? extends SDDocumentSource> metadata,
                                               @Nullable
                                               EntityResolver resolver,
                                               boolean isTransportSynchronous)
        Creates an endpoint from deployment or programmatic configuration

        This method works like the following:

        1. ServiceDefinition is modeleed from the given SEI type.
        2. Invoker that always serves implementationObject will be used.
        Parameters:
        implType - Endpoint class(not SEI). Enpoint class must have @WebService or @WebServiceProvider annotation.
        processHandlerAnnotation - Flag to control processing of @HandlerChain on Impl class if true, processes @HandlerChain on Impl if false, DD might have set HandlerChain no need to parse.
        invoker - Pass an object to invoke the actual endpoint object. If it is null, a default invoker is created using InstanceResolver.createDefault(java.lang.Class<T>, boolean). Appservers could create its own invoker to do additional functions like transactions, invoking the endpoint through proxy etc.
        serviceName - Optional service name(may be from DD) to override the one given by the implementation class. If it is null, it will be derived from annotations.
        portName - Optional port name(may be from DD) to override the one given by the implementation class. If it is null, it will be derived from annotations.
        container - Allows technologies that are built on top of JAX-WS(such as WSIT) needs to negotiate private contracts between them and the container
        binding - JAX-WS implementation of Binding. This object can be created by BindingID.createBinding(). Usually the binding can be got from DD, BindingType. TODO: DD has a configuration for MTOM threshold. Maybe we need something more generic so that other technologies like Tango can get information from DD. TODO: does it really make sense for this to take EntityResolver? Given that all metadata has to be given as a list anyway.
        primaryWsdl - The primary WSDL. If null, it'll be generated based on the SEI (if this is an SEI) or no WSDL is associated (if it's a provider.) TODO: shouldn't the implementation find this from the metadata list?
        metadata - Other documents that become SDDocuments. Can be null.
        resolver - Optional resolver used to de-reference resources referenced from WSDL. Must be null if the url is null.
        isTransportSynchronous - If the caller knows that the returned WSEndpoint is going to be used by a synchronous-only transport, then it may pass in true to allow the callee to perform an optimization based on that knowledge (since often synchronous version is cheaper than an asynchronous version.) This value is visible from ServerTubeAssemblerContext.isSynchronous().
        Returns:
        newly constructed WSEndpoint.
        Throws:
        jakarta.xml.ws.WebServiceException - if the endpoint set up fails.
      • getDefaultServiceName

        @NotNull
        public static QName getDefaultServiceName​(Class endpointClass)
        Gives the wsdl:service default name computed from the endpoint implementaiton class
      • getDefaultServiceName

        @NotNull
        public static QName getDefaultServiceName​(Class endpointClass,
                                                  MetadataReader metadataReader)
      • getDefaultServiceName

        @NotNull
        public static QName getDefaultServiceName​(Class endpointClass,
                                                  boolean isStandard)
      • getDefaultServiceName

        @NotNull
        public static QName getDefaultServiceName​(Class endpointClass,
                                                  boolean isStandard,
                                                  MetadataReader metadataReader)
      • getDefaultPortName

        @NotNull
        public static QName getDefaultPortName​(@NotNull
                                               QName serviceName,
                                               Class endpointClass)
        Gives the wsdl:service/wsdl:port default name computed from the endpoint implementaiton class
      • getDefaultPortName

        @NotNull
        public static QName getDefaultPortName​(@NotNull
                                               QName serviceName,
                                               Class endpointClass,
                                               MetadataReader metadataReader)
      • getDefaultPortName

        @NotNull
        public static QName getDefaultPortName​(@NotNull
                                               QName serviceName,
                                               Class endpointClass,
                                               boolean isStandard)
      • getDefaultPortName

        @NotNull
        public static QName getDefaultPortName​(@NotNull
                                               QName serviceName,
                                               Class endpointClass,
                                               boolean isStandard,
                                               MetadataReader metadataReader)
      • getEndpointReference

        public abstract <T extends jakarta.xml.ws.EndpointReference> T getEndpointReference​(Class<T> clazz,
                                                                                            String address,
                                                                                            String wsdlAddress,
                                                                                            Element... referenceParameters)
        Return EndpointReference instance, based on passed parameters and spec version represented by clazz
        Type Parameters:
        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 abstract <T extends jakarta.xml.ws.EndpointReference> T getEndpointReference​(Class<T> clazz,
                                                                                            String address,
                                                                                            String wsdlAddress,
                                                                                            List<Element> metadata,
                                                                                            List<Element> referenceParameters)
        Type Parameters:
        T -
        Parameters:
        clazz -
        address -
        wsdlAddress -
        metadata -
        referenceParameters -
        Returns:
        EndpointReference instance based on passed parameters and values obtained from current instance
      • equalsProxiedInstance

        public boolean equalsProxiedInstance​(WSEndpoint endpoint)
        Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.
        Parameters:
        endpoint -
        Returns:
        true if the proxied endpoint instance held by this instance equals to 'endpoint', otherwise return false.
      • getOperationDispatcher

        @Nullable
        public abstract OperationDispatcher getOperationDispatcher()
        Nullable when there is no associated WSDL Model
        Returns: