This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.xml.ws
class Endpoint

java.lang.Object extended by javax.xml.ws.Endpoint

public abstract class Endpoint
extends Object

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.


Field Summary
static String WSDL_PORT
          Standard property: name of WSDL port.
static String WSDL_SERVICE
          Standard property: name of WSDL service.
 
Constructor Summary

          
 
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

          Returns the binding for this endpoint.
abstract EndpointReference
getEndpointReference(Class clazz, Element[] referenceParameters)

          Returns the EndpointReference associated with this Endpoint instance.
abstract EndpointReference
getEndpointReference(Element[] referenceParameters)

          Returns the EndpointReference associated with this Endpoint instance.
abstract Executor

          Returns the executor for this Endpointinstance.
abstract Object

          Returns the implementation object for this endpoint.
abstract List

          Returns a list of metadata documents for the service.
abstract Map

          Returns the property bag for this Endpoint instance.
abstract boolean

          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

          Sets the executor for this Endpoint instance.
abstract void
setMetadata(List metadata)

          Sets the metadata for this endpoint.
abstract void
setProperties(Map properties)

          Sets the property bag for this Endpoint instance.
abstract void

          Stops publishing this endpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSDL_PORT

public static final String WSDL_PORT
Standard property: name of WSDL port.

Type: javax.xml.namespace.QName


WSDL_SERVICE

public static final String WSDL_SERVICE
Standard property: name of WSDL service.

Type: javax.xml.namespace.QName

Constructor Detail

Endpoint

public Endpoint()
Method Detail

create

public static Endpoint create(Object implementor)
Creates an endpoint with the specified implementor object. If there is a binding specified via a BindingType annotation then it MUST be used else a default of SOAP 1.1 / HTTP binding MUST be used.

The newly created endpoint may be published by calling one of the {@link javax.xml.ws.Endpoint#publish(String)} and {@link javax.xml.ws.Endpoint#publish(Object)} methods.

Parameters:
implementor - The endpoint implementor.
Returns:
The newly created endpoint.

create

public static Endpoint create(String bindingId,
                              Object implementor)
Creates an endpoint with the specified binding type and implementor object.

The newly created endpoint may be published by calling one of the {@link javax.xml.ws.Endpoint#publish(String)} and {@link javax.xml.ws.Endpoint#publish(Object)} methods.

Parameters:
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.
Returns:
The newly created endpoint.

getBinding

public abstract Binding getBinding()
Returns the binding for this endpoint.

Returns:
The binding for this endpoint

getEndpointReference

public abstract EndpointReference getEndpointReference(Class clazz,
                                                       Element[] referenceParameters)
Returns the EndpointReference associated with this Endpoint instance.

Parameters:
clazz - Specifies the type of EndpointReference that MUST be returned.
referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
Returns:
EndpointReference of type clazz of this Endpoint instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.

getEndpointReference

public abstract EndpointReference getEndpointReference(Element[] referenceParameters)
Returns the 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.

Parameters:
referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
Returns:
EndpointReference of this Endpoint instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.

getExecutor

public abstract Executor getExecutor()
Returns the executor for this Endpointinstance. The executor is used to dispatch an incoming request to the implementor object.

Returns:
The java.util.concurrent.Executor to be used to dispatch a request.

getImplementor

public abstract Object getImplementor()
Returns the implementation object for this endpoint.

Returns:
The implementor for this endpoint

getMetadata

public abstract List getMetadata()
Returns a list of metadata documents for the service.

Returns:
List<javax.xml.transform.Source> A list of metadata documents for the service

getProperties

public abstract Map getProperties()
Returns the property bag for this Endpoint instance.

Returns:
Map<String,Object> The property bag associated with this instance.

isPublished

public abstract boolean isPublished()
Returns true if the endpoint is in the published state.

Returns:
true if the endpoint is in the published state.

publish

public abstract void publish(Object serverContext)
Publishes this endpoint at the provided server context. A server context encapsulates the server infrastructure and addressing information for a particular transport. For a call to this method to succeed, the server context passed as an argument to it MUST be compatible with the endpoint's binding.

Parameters:
serverContext - An object representing a server context to be used for publishing the endpoint.

publish

public abstract void publish(String address)
Publishes this endpoint at the given address. 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 {@link javax.xml.ws.Endpoint#publish(Object)} method instead.

Parameters:
address - A URI specifying the address to use. The address MUST be compatible with the binding specified at the time the endpoint was created.

publish

public static Endpoint publish(String address,
                               Object implementor)
Creates and publishes an endpoint for the specified implementor object at the given address.

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 {@link javax.xml.ws.Endpoint#create(String,Object)} and {@link javax.xml.ws.Endpoint#publish(Object)} methods instead.

Parameters:
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.
Returns:
The newly created endpoint.

setExecutor

public abstract void setExecutor(Executor executor)
Sets the executor for this 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.

Parameters:
executor - The java.util.concurrent.Executor to be used to dispatch a request.

setMetadata

public abstract void setMetadata(List metadata)
Sets the metadata for this endpoint.

Parameters:
metadata - A list of XML document sources containing metadata information for the endpoint (e.g. WSDL or XML Schema documents)

setProperties

public abstract void setProperties(Map properties)
Sets the property bag for this Endpoint instance.

Parameters:
properties - The property bag associated with this instance.

stop

public abstract void stop()
Stops publishing this endpoint. If the endpoint is not in a published state, this method has no effect.



This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.