Class WSEndpointImpl<T>
- All Implemented Interfaces:
Component,ComponentRegistry,LazyMOMProvider.ScopeChangeListener,LazyMOMProvider.WSEndpointScopeChangeListener
WSEndpoint implementation.- Author:
- Kohsuke Kawaguchi, Jitendra Kotamraju
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.WSEndpoint
WSEndpoint.CompletionCallback, WSEndpoint.PipeHead -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWSEndpointImpl(QName serviceName, QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Tube masterTubeline) protectedWSEndpointImpl(QName serviceName, QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Class<T> implementationClass, ServiceDefinitionImpl serviceDef, EndpointAwareTube terminalTube, boolean isSynchronous, PolicyMap endpointPolicy) -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the ManagedObjectManager for this endpoint.Gets the Endpoint's codec that is used to encode/decodeMessages.Creates a newWSEndpoint.PipeHeadto process incoming requests.protected ServerTubeAssemblerContextcreateServerTubeAssemblerContext(EndpointAwareTube terminalTube, boolean isSynchronous) 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.voiddispose()Indicates that theWSEndpointis about to be turned off, and will no longer serve any packet anymore.This is only needed to expose info for monitoring.Represents the binding for which thisWSEndpointis created for.Gets the list ofComponents that are associated with this endpoint.Gets theContainerobject.<T extends javax.xml.ws.EndpointReference>
TgetEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters) <T extends javax.xml.ws.EndpointReference>
TgetEndpointReference(Class<T> clazz, String address, String wsdlAddress, Element... referenceParameters) Return EndpointReference instance, based on passed parameters and spec version represented by clazzReturnsEnginefor this endpointGets the application endpointClassthat eventually serves the request.org.glassfish.gmbal.ManagedObjectManagerGet the ManagedObjectManager for this endpoint.Nullable when there is no associated WSDL ModelGives the PolicMap that captures the Policy for the endpointgetPort()Gets the port that this endpoint is serving.Gets the application endpoint's portName.Gets theSEIModelthat represents the relationship between WSDL and Java SEI.Gets the description of the service.Gets the application endpoint's serviceName.voidprocess(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor) voidschedule(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor) Schedule invocation of web service asynchronously.voidvoidsetExecutor(Executor exec) Set thisExecutorto run asynchronous requests using this executor.Methods inherited from class com.sun.xml.ws.api.server.WSEndpoint
create, create, create, create, equalsProxiedInstance, getBoundEndpoints, getComponentRegistry, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getSPI, schedule
-
Field Details
-
binding
-
masterTubeline
-
-
Constructor Details
-
WSEndpointImpl
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Class<T> implementationClass, @Nullable ServiceDefinitionImpl serviceDef, EndpointAwareTube terminalTube, boolean isSynchronous, PolicyMap endpointPolicy) -
WSEndpointImpl
-
-
Method Details
-
createServerTubeAssemblerContext
protected ServerTubeAssemblerContext createServerTubeAssemblerContext(EndpointAwareTube terminalTube, boolean isSynchronous) -
getEndpointReferenceExtensions
-
getOperationDispatcher
Nullable when there is no associated WSDL Model- Specified by:
getOperationDispatcherin classWSEndpoint<T>- Returns:
-
getPolicyMap
Description copied from class:WSEndpointGives the PolicMap that captures the Policy for the endpoint- Specified by:
getPolicyMapin classWSEndpoint<T>- Returns:
- PolicyMap
-
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<T>
-
getBinding
Description copied from class:WSEndpointRepresents the binding for which thisWSEndpointis created for.- Specified by:
getBindingin classWSEndpoint<T>- Returns:
- always same object.
-
getContainer
Description copied from class:WSEndpointGets theContainerobject.The components inside
WSEndpointuses this reference to communicate with the hosting environment.- Specified by:
getContainerin classWSEndpoint<T>- Returns:
- always same object. If no "real"
Containerinstance is given,Container.NONEwill be returned.
-
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<T>- Returns:
- Possibly null, but always the same value.
-
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<T>- Returns:
- maybe null. See above for more discussion. Always the same value.
-
setExecutor
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<T>- Parameters:
exec- Executor to run async requests
-
getEngine
Description copied from class:WSEndpointReturnsEnginefor this endpoint- Overrides:
getEnginein classWSEndpoint<T>- Returns:
- Engine
-
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<T>- 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:
-
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<T>
-
process
public void process(Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor) - Overrides:
processin classWSEndpoint<T>
-
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<T>- 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<T>
-
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<T>- Returns:
- Possibly null, always the same value under ordinary circumstances but may change if the endpoint is managed.
-
getComponents
Description copied from class:WSEndpointGets the list ofComponents 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
Component.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:
getComponentsin interfaceComponentRegistry- Overrides:
getComponentsin classWSEndpoint<T>- Returns:
- always return the same set.
-
getEndpointReference
public <T extends javax.xml.ws.EndpointReference> T getEndpointReference(Class<T> 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<T>- 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 <T extends javax.xml.ws.EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters) - Specified by:
getEndpointReferencein classWSEndpoint<T>- Returns:
- EndpointReference instance based on passed parameters and values obtained from current instance
-
getPortName
Description copied from class:WSEndpointGets the application endpoint's portName. It could be got from DD or annotations- Specified by:
getPortNamein classWSEndpoint<T>- Returns:
- same as wsdl:port QName if WSDL exists or generated
-
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<T>- Returns:
- codec to encode/decode
-
getServiceName
Description copied from class:WSEndpointGets the application endpoint's serviceName. It could be got from DD or annotations- Specified by:
getServiceNamein classWSEndpoint<T>- Returns:
- same as wsdl:service QName if WSDL exists or generated
-
getManagedObjectManager
@NotNull public org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()Description copied from class:WSEndpointGet the ManagedObjectManager for this endpoint.- Specified by:
getManagedObjectManagerin classWSEndpoint<T>
-
scopeChanged
- Specified by:
scopeChangedin interfaceLazyMOMProvider.ScopeChangeListener
-
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<T>
-
getAssemblerContext
Description copied from class:WSEndpointThis is only needed to expose info for monitoring.- Specified by:
getAssemblerContextin classWSEndpoint<T>
-