public class WSEndpointImpl<T> extends WSEndpoint<T> implements LazyMOMProvider.WSEndpointScopeChangeListener
WSEndpoint
implementation.WSEndpoint.CompletionCallback, WSEndpoint.PipeHead
Modifier and Type | Field and Description |
---|---|
protected WSBinding |
binding |
protected Tube |
masterTubeline |
Modifier | Constructor and Description |
---|---|
protected |
WSEndpointImpl(QName serviceName,
QName portName,
WSBinding binding,
Container container,
SEIModel seiModel,
WSDLPort port,
Class<T> implementationClass,
ServiceDefinitionImpl serviceDef,
EndpointAwareTube terminalTube,
boolean isSynchronous,
com.sun.xml.ws.policy.PolicyMap endpointPolicy) |
protected |
WSEndpointImpl(QName serviceName,
QName portName,
WSBinding binding,
Container container,
SEIModel seiModel,
WSDLPort port,
Tube masterTubeline) |
Modifier and Type | Method and Description |
---|---|
void |
closeManagedObjectManager()
Close the ManagedObjectManager for this endpoint.
|
Codec |
createCodec()
Gets the Endpoint's codec that is used to encode/decode
Message s. |
WSEndpoint.PipeHead |
createPipeHead()
Creates a new
WSEndpoint.PipeHead to process
incoming requests. |
protected ServerTubeAssemblerContext |
createServerTubeAssemblerContext(EndpointAwareTube terminalTube,
boolean isSynchronous) |
com.sun.xml.ws.api.message.Packet |
createServiceResponseForException(ThrowableContainerPropertySet tc,
com.sun.xml.ws.api.message.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 the
WSEndpoint is about to be turned off,
and will no longer serve any packet anymore. |
ServerTubeAssemblerContext |
getAssemblerContext()
This is only needed to expose info for monitoring.
|
WSBinding |
getBinding()
Represents the binding for which this
WSEndpoint
is created for. |
Set<EndpointComponent> |
getComponentRegistry()
Gets the list of
EndpointComponent that are associated
with this endpoint. |
Set<Component> |
getComponents()
Returns the set of
Component s registered with this object |
Container |
getContainer()
Gets the
Container object. |
<T extends EndpointReference> |
getEndpointReference(Class<T> clazz,
String address,
String wsdlAddress,
Element... referenceParameters)
Return EndpointReference instance, based on passed parameters and spec version represented by clazz
|
<T extends EndpointReference> |
getEndpointReference(Class<T> clazz,
String address,
String wsdlAddress,
List<Element> metadata,
List<Element> referenceParameters) |
Collection<WSEndpointReference.EPRExtension> |
getEndpointReferenceExtensions() |
Engine |
getEngine()
Returns
Engine for this endpoint |
Class<T> |
getImplementationClass()
Gets the application endpoint
Class that eventually serves the request. |
org.glassfish.gmbal.ManagedObjectManager |
getManagedObjectManager()
Get the ManagedObjectManager for this endpoint.
|
OperationDispatcher |
getOperationDispatcher()
Nullable when there is no associated WSDL Model
|
com.sun.xml.ws.policy.PolicyMap |
getPolicyMap()
Gives the PolicMap that captures the Policy for the endpoint
|
WSDLPort |
getPort()
Gets the port that this endpoint is serving.
|
QName |
getPortName()
Gets the application endpoint's portName.
|
SEIModel |
getSEIModel()
Gets the
SEIModel that represents the relationship
between WSDL and Java SEI. |
ServiceDefinitionImpl |
getServiceDefinition()
Gets the description of the service.
|
QName |
getServiceName()
Gets the application endpoint's serviceName.
|
void |
process(com.sun.xml.ws.api.message.Packet request,
WSEndpoint.CompletionCallback callback,
FiberContextSwitchInterceptor interceptor) |
void |
schedule(com.sun.xml.ws.api.message.Packet request,
WSEndpoint.CompletionCallback callback,
FiberContextSwitchInterceptor interceptor)
Schedule invocation of web service asynchronously.
|
void |
scopeChanged(LazyMOMProvider.Scope scope) |
void |
setExecutor(Executor exec)
Set this
Executor to run asynchronous requests using this executor. |
create, create, create, create, equalsProxiedInstance, getBoundEndpoints, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getSPI, schedule
protected final WSBinding binding
protected final Tube masterTubeline
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, com.sun.xml.ws.policy.PolicyMap endpointPolicy)
protected ServerTubeAssemblerContext createServerTubeAssemblerContext(EndpointAwareTube terminalTube, boolean isSynchronous)
public Collection<WSEndpointReference.EPRExtension> getEndpointReferenceExtensions()
@Nullable public OperationDispatcher getOperationDispatcher()
getOperationDispatcher
in class WSEndpoint<T>
public com.sun.xml.ws.policy.PolicyMap getPolicyMap()
WSEndpoint
getPolicyMap
in class WSEndpoint<T>
@NotNull public Class<T> getImplementationClass()
WSEndpoint
Class
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.
getImplementationClass
in class WSEndpoint<T>
@NotNull public WSBinding getBinding()
WSEndpoint
WSEndpoint
is created for.getBinding
in class WSEndpoint<T>
@NotNull public Container getContainer()
WSEndpoint
Container
object.
The components inside WSEndpoint
uses this reference
to communicate with the hosting environment.
getContainer
in class WSEndpoint<T>
Container
instance
is given, Container.NONE
will be returned.public WSDLPort getPort()
WSEndpoint
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.
getPort
in class WSEndpoint<T>
@Nullable public SEIModel getSEIModel()
WSEndpoint
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.
getSEIModel
in class WSEndpoint<T>
public void setExecutor(Executor exec)
WSEndpoint
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.setExecutor
in class WSEndpoint<T>
exec
- Executor to run async requestspublic Engine getEngine()
WSEndpoint
Engine
for this endpointgetEngine
in class WSEndpoint<T>
public void schedule(com.sun.xml.ws.api.message.Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)
WSEndpoint
schedule
in class WSEndpoint<T>
request
- web service requestcallback
- callback to get response packet(exception if there is one)interceptor
- caller's interceptor to impose a context of executionWSEndpoint.schedule(Packet, CompletionCallback)
public com.sun.xml.ws.api.message.Packet createServiceResponseForException(ThrowableContainerPropertySet tc, com.sun.xml.ws.api.message.Packet responsePacket, SOAPVersion soapVersion, WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding)
WSEndpoint
createServiceResponseForException
in class WSEndpoint<T>
public void process(com.sun.xml.ws.api.message.Packet request, WSEndpoint.CompletionCallback callback, FiberContextSwitchInterceptor interceptor)
process
in class WSEndpoint<T>
@NotNull public WSEndpoint.PipeHead createPipeHead()
WSEndpoint
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.
createPipeHead
in class WSEndpoint<T>
WSEndpoint.PipeHead
that's ready to serve.public void dispose()
WSEndpoint
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.
dispose
in class WSEndpoint<T>
public ServiceDefinitionImpl getServiceDefinition()
WSEndpoint
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.
getServiceDefinition
in class WSEndpoint<T>
public Set<EndpointComponent> getComponentRegistry()
WSEndpoint
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.
getComponentRegistry
in class WSEndpoint<T>
@NotNull public Set<Component> getComponents()
ComponentRegistry
Component
s registered with this objectgetComponents
in interface ComponentRegistry
getComponents
in class WSEndpoint<T>
public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, Element... referenceParameters)
WSEndpoint
getEndpointReference
in class WSEndpoint<T>
clazz
- represents spec versionaddress
- endpoint addresswsdlAddress
- wsdl addressreferenceParameters
- any reference parameters to be added to the instancepublic <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters)
getEndpointReference
in class WSEndpoint<T>
@NotNull public QName getPortName()
WSEndpoint
getPortName
in class WSEndpoint<T>
@NotNull public Codec createCodec()
WSEndpoint
Message
s. This is a
copy of the master codec and it shouldn't be shared across two requests running
concurrently(unless it is stateless).createCodec
in class WSEndpoint<T>
@NotNull public QName getServiceName()
WSEndpoint
getServiceName
in class WSEndpoint<T>
@NotNull public org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
WSEndpoint
getManagedObjectManager
in class WSEndpoint<T>
public void scopeChanged(LazyMOMProvider.Scope scope)
scopeChanged
in interface LazyMOMProvider.ScopeChangeListener
public void closeManagedObjectManager()
WSEndpoint
closeManagedObjectManager
in class WSEndpoint<T>
@NotNull public ServerTubeAssemblerContext getAssemblerContext()
WSEndpoint
getAssemblerContext
in class WSEndpoint<T>
Copyright © 2015 Oracle Corporation. All rights reserved.