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 one based on the annotations present on the implementor.
Field Summary | |
---|---|
static String |
WSDL_PORT
Standard property: name of WSDL port. |
static String |
WSDL_SERVICE
Standard property: name of WSDL service. |
Constructor Summary | |
---|---|
Endpoint
() |
Method Summary | |
---|---|
static Endpoint |
create
(
Object
implementor) Creates an endpoint with the specified implementor object. |
static Endpoint |
create
(
String
bindingId,
Object
implementor) Creates an endpoint with the specified binding type and implementor object. |
abstract Binding |
getBinding
() Returns the binding for this endpoint. |
abstract Executor |
getExecutor
() Returns the executor for this Endpointinstance. |
abstract Object |
getImplementor
() Returns the implementation object for this endpoint. |
abstract List < Source > |
getMetadata
() Returns a list of metadata documents for the service. |
abstract Map < String , Object > |
getProperties
() Returns the property bag for this Endpoint instance. |
abstract boolean |
isPublished
() Returns true if the endpoint is in the published state. |
abstract void |
publish
(
Object
serverContext) Publishes this endpoint at the provided server context. |
abstract void |
publish
(
String
address) Publishes this endpoint at the given address. |
static Endpoint |
publish
(
String
address,
Object
implementor) Creates and publishes an endpoint for the specified implementor object at the given address. |
abstract void |
setExecutor
(
Executor
executor) Sets the executor for this Endpoint instance. |
abstract void |
setMetadata
(
List
<
Source
> metadata) Sets the metadata for this endpoint. |
abstract void |
setProperties
(
Map
<
String
,
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 String WSDL_SERVICE
Type: javax.xml.namespace.QName
public static final String WSDL_PORT
Type: javax.xml.namespace.QName
Constructor Detail |
---|
public Endpoint()
Method Detail |
---|
public static Endpoint create(Object implementor)
The newly created endpoint may be published by calling one of the javax.xml.ws.Endpoint#publish(String) and javax.xml.ws.Endpoint#publish(Object) methods.
public static Endpoint create(String bindingId, Object implementor)
The newly created endpoint may be published by calling one of the javax.xml.ws.Endpoint#publish(String) and javax.xml.ws.Endpoint#publish(Object) methods.
public abstract Binding getBinding()
public abstract Object getImplementor()
public abstract void publish(String address)
public static Endpoint publish(String address, 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 javax.xml.ws.Endpoint#create(String,Object) and javax.xml.ws.Endpoint#publish(Object) method instead.
public abstract void publish(Object serverContext)
public abstract void stop()
public abstract boolean isPublished()
public abstract List<Source> getMetadata()
public abstract void setMetadata(List<Source> metadata)
public abstract Executor getExecutor()
public abstract void setExecutor(Executor executor)
public abstract Map<String,Object> getProperties()
public abstract void setProperties(Map<String,Object> properties)