|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.ws.Endpoint
public abstract class Endpoint
A Web service endpoint.
Endpoints are created using the static methods defined in this
class. An endpoint is always tied to one Binding
and one implementor, both set at endpoint creation time.
An endpoint is either in a published or an unpublished state.
The publish
methods can be used to start publishing
an endpoint, at which point it starts accepting incoming requests.
Conversely, the stop
method can be used to stop
accepting incoming requests and take the endpoint down.
Once stopped, an endpoint cannot be published again.
An Executor
may be set on the endpoint in order
to gain better control over the threads used to dispatch incoming
requests. For instance, thread pooling with certain parameters
can be enabled by creating a ThreadPoolExecutor
and
registering it with the endpoint.
Handler chains can be set using the contained Binding
.
An endpoint may have a list of metadata documents, such as WSDL and XMLSchema documents, bound to it. At publishing time, the JAX-WS implementation will try to reuse as much of that metadata as possible instead of generating new ones based on the annotations present on the implementor.
Binding
,
BindingType
,
SOAPBinding
,
Executor
Field Summary | |
---|---|
static java.lang.String |
WSDL_PORT
Standard property: name of WSDL port. |
static java.lang.String |
WSDL_SERVICE
Standard property: name of WSDL service. |
Constructor Summary | |
---|---|
Endpoint()
|
Method Summary | ||
---|---|---|
static Endpoint |
create(java.lang.Object implementor)
Creates an endpoint with the specified implementor object. |
|
static Endpoint |
create(java.lang.Object implementor,
WebServiceFeature... features)
Creates an endpoint with the specified implementor object and web service features. |
|
static Endpoint |
create(java.lang.String bindingId,
java.lang.Object implementor)
Creates an endpoint with the specified binding type and implementor object. |
|
static Endpoint |
create(java.lang.String bindingId,
java.lang.Object implementor,
WebServiceFeature... features)
Creates an endpoint with the specified binding type, implementor object, and web service features. |
|
abstract Binding |
getBinding()
Returns the binding for this endpoint. |
|
abstract
|
getEndpointReference(java.lang.Class<T> clazz,
org.w3c.dom.Element... referenceParameters)
Returns the EndpointReference associated with
this Endpoint instance. |
|
abstract EndpointReference |
getEndpointReference(org.w3c.dom.Element... referenceParameters)
Returns the EndpointReference associated with
this Endpoint instance. |
|
abstract java.util.concurrent.Executor |
getExecutor()
Returns the executor for this Endpoint instance. |
|
abstract java.lang.Object |
getImplementor()
Returns the implementation object for this endpoint. |
|
abstract java.util.List<javax.xml.transform.Source> |
getMetadata()
Returns a list of metadata documents for the service. |
|
abstract java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns the property bag for this Endpoint instance. |
|
abstract boolean |
isPublished()
Returns true if the endpoint is in the published state. |
|
void |
publish(HttpContext serverContext)
Publishes this endpoint at the provided server context. |
|
abstract void |
publish(java.lang.Object serverContext)
Publishes this endpoint at the provided server context. |
|
abstract void |
publish(java.lang.String address)
Publishes this endpoint at the given address. |
|
static Endpoint |
publish(java.lang.String address,
java.lang.Object implementor)
Creates and publishes an endpoint for the specified implementor object at the given address. |
|
static Endpoint |
publish(java.lang.String address,
java.lang.Object implementor,
WebServiceFeature... features)
Creates and publishes an endpoint for the specified implementor object at the given address. |
|
void |
setEndpointContext(EndpointContext ctxt)
By settng a EndpointContext , JAX-WS runtime knows about
addresses of other endpoints in an application. |
|
abstract void |
setExecutor(java.util.concurrent.Executor executor)
Sets the executor for this Endpoint instance. |
|
abstract void |
setMetadata(java.util.List<javax.xml.transform.Source> metadata)
Sets the metadata for this endpoint. |
|
abstract void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the property bag for this Endpoint instance. |
|
abstract void |
stop()
Stops publishing this endpoint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WSDL_SERVICE
Type: javax.xml.namespace.QName
public static final java.lang.String WSDL_PORT
Type: javax.xml.namespace.QName
Constructor Detail |
---|
public Endpoint()
Method Detail |
---|
public static Endpoint create(java.lang.Object implementor)
The newly created endpoint may be published by calling
one of the publish(String)
and
publish(Object)
methods.
implementor
- The endpoint implementor.
public static Endpoint create(java.lang.Object implementor, WebServiceFeature... features)
The newly created endpoint may be published by calling
one of the publish(String)
and
publish(Object)
methods.
implementor
- The endpoint implementor.features
- A list of WebServiceFeature to configure on the
endpoint. Supported features not in the features
parameter will have their default values.
public static Endpoint create(java.lang.String bindingId, java.lang.Object implementor)
The newly created endpoint may be published by calling
one of the publish(String)
and
publish(Object)
methods.
bindingId
- A URI specifying the binding to use. If the bindingID is
null
and no binding is specified via a BindingType
annotation then a default SOAP 1.1 / HTTP binding MUST be used.implementor
- The endpoint implementor.
public static Endpoint create(java.lang.String bindingId, java.lang.Object implementor, WebServiceFeature... features)
The newly created endpoint may be published by calling
one of the publish(String)
and
publish(Object)
methods.
bindingId
- A URI specifying the binding to use. If the bindingID is
null
and no binding is specified via a BindingType
annotation then a default SOAP 1.1 / HTTP binding MUST be used.implementor
- The endpoint implementor.features
- A list of WebServiceFeature to configure on the
endpoint. Supported features not in the features
parameter will have their default values.
public abstract Binding getBinding()
public abstract java.lang.Object getImplementor()
public abstract void publish(java.lang.String address)
publish(Object)
method instead.
address
- A URI specifying the address to use. The address
MUST be compatible with the binding specified at the
time the endpoint was created.
java.lang.IllegalArgumentException
- If the provided address URI is not usable
in conjunction with the endpoint's binding.
java.lang.IllegalStateException
- If the endpoint has been published already or it has been stopped.
java.lang.SecurityException
- If a java.lang.SecurityManger
is being used and the application doesn't have the
WebServicePermission("publishEndpoint")
permission.public static Endpoint publish(java.lang.String address, java.lang.Object implementor)
The necessary server infrastructure will be created and
configured by the JAX-WS implementation using some default configuration.
In order to get more control over the server configuration, please
use the create(String,Object)
and
publish(Object)
methods instead.
address
- A URI specifying the address and transport/protocol
to use. A http: URI MUST result in the SOAP 1.1/HTTP
binding being used. Implementations may support other
URI schemes.implementor
- The endpoint implementor.
java.lang.SecurityException
- If a java.lang.SecurityManger
is being used and the application doesn't have the
WebServicePermission("publishEndpoint")
permission.public static Endpoint publish(java.lang.String address, java.lang.Object implementor, WebServiceFeature... features)
The necessary server infrastructure will be created and
configured by the JAX-WS implementation using some default configuration.
In order to get more control over the server configuration, please
use the create(String,Object)
and
publish(Object)
methods instead.
address
- A URI specifying the address and transport/protocol
to use. A http: URI MUST result in the SOAP 1.1/HTTP
binding being used. Implementations may support other
URI schemes.implementor
- The endpoint implementor.features
- A list of WebServiceFeature to configure on the
endpoint. Supported features not in the features
parameter will have their default values.
java.lang.SecurityException
- If a java.lang.SecurityManger
is being used and the application doesn't have the
WebServicePermission("publishEndpoint")
permission.public abstract void publish(java.lang.Object serverContext)
serverContext
- An object representing a server
context to be used for publishing the endpoint.
java.lang.IllegalArgumentException
- If the provided server context is not
supported by the implementation or turns
out to be unusable in conjunction with the
endpoint's binding.
java.lang.IllegalStateException
- If the endpoint has been published already or it has been stopped.
java.lang.SecurityException
- If a java.lang.SecurityManger
is being used and the application doesn't have the
WebServicePermission("publishEndpoint")
permission.public void publish(HttpContext serverContext)
This is meant for container developers to publish the the endpoints portably and not intended for the end developers.
serverContext
- An object representing a server
context to be used for publishing the endpoint.
java.lang.IllegalArgumentException
- If the provided server context is not
supported by the implementation or turns
out to be unusable in conjunction with the
endpoint's binding.
java.lang.IllegalStateException
- If the endpoint has been published already or it has been stopped.
java.lang.SecurityException
- If a java.lang.SecurityManger
is being used and the application doesn't have the
WebServicePermission("publishEndpoint")
permission.public abstract void stop()
public abstract boolean isPublished()
true
if the endpoint is in the published state.public abstract java.util.List<javax.xml.transform.Source> getMetadata()
List<javax.xml.transform.Source>
A list of metadata documents for the servicepublic abstract void setMetadata(java.util.List<javax.xml.transform.Source> metadata)
metadata
- A list of XML document sources containing
metadata information for the endpoint (e.g.
WSDL or XML Schema documents)
java.lang.IllegalStateException
- If the endpoint
has already been published.public abstract java.util.concurrent.Executor getExecutor()
Endpoint
instance.
The executor is used to dispatch an incoming request to
the implementor object.
java.util.concurrent.Executor
to be
used to dispatch a request.Executor
public abstract void setExecutor(java.util.concurrent.Executor executor)
Endpoint
instance.
The executor is used to dispatch an incoming request to
the implementor object.
If this Endpoint
is published using the
publish(Object)
method and the specified server
context defines its own threading behavior, the executor
may be ignored.
executor
- The java.util.concurrent.Executor
to be used to dispatch a request.
SecurityException
- If the instance does not support
setting an executor for security reasons (e.g. the
necessary permissions are missing).Executor
public abstract java.util.Map<java.lang.String,java.lang.Object> getProperties()
Endpoint
instance.
public abstract void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Endpoint
instance.
properties
- The property bag associated with
this instance.public abstract EndpointReference getEndpointReference(org.w3c.dom.Element... referenceParameters)
EndpointReference
associated with
this Endpoint
instance.
If the Binding for this bindingProvider
is
either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
W3CEndpointReference
MUST be returned.
referenceParameters
- Reference parameters to be associated with the
returned EndpointReference
instance.
Endpoint
instance.
If the returned EndpointReference
is of type
W3CEndpointReference
then it MUST contain the
the specified referenceParameters
.
WebServiceException
- If any error in the creation of
the EndpointReference
or if the Endpoint
is
not in the published state.
java.lang.UnsupportedOperationException
- If this BindingProvider
uses the XML/HTTP binding.W3CEndpointReference
public abstract <T extends EndpointReference> T getEndpointReference(java.lang.Class<T> clazz, org.w3c.dom.Element... referenceParameters)
EndpointReference
associated with
this Endpoint
instance.
clazz
- Specifies the type of EndpointReference that MUST be returned.referenceParameters
- Reference parameters to be associated with the
returned EndpointReference
instance.
clazz
of this
Endpoint instance.
If the returned EndpointReference
is of type
W3CEndpointReference
then it MUST contain the
the specified referenceParameters
.
- Throws:
WebServiceException
- If any error in the creation of
the EndpointReference
or if the Endpoint
is
not in the published state or if the clazz
is not a supported
EndpointReference
type.
java.lang.UnsupportedOperationException
- If this BindingProvider
uses the XML/HTTP binding.- Since:
- JAX-WS 2.1
public void setEndpointContext(EndpointContext ctxt)
EndpointContext
, JAX-WS runtime knows about
addresses of other endpoints in an application. If multiple endpoints
share different ports of a WSDL, then the multiple port addresses
are patched when the WSDL is accessed.
This needs to be set before publishing the endpoints.
ctxt
- that is shared for multiple endpoints
java.lang.IllegalStateException
- If the endpoint has been published already or it has been stopped.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34