< prev index next >
src/java.xml.ws/share/classes/javax/xml/ws/Endpoint.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 35,61 ****
/**
* A Web service endpoint.
*
* <p>Endpoints are created using the static methods defined in this
! * class. An endpoint is always tied to one <code>Binding</code>
* and one implementor, both set at endpoint creation time.
*
* <p>An endpoint is either in a published or an unpublished state.
! * The <code>publish</code> methods can be used to start publishing
* an endpoint, at which point it starts accepting incoming requests.
! * Conversely, the <code>stop</code> method can be used to stop
* accepting incoming requests and take the endpoint down.
* Once stopped, an endpoint cannot be published again.
*
! * <p>An <code>Executor</code> 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 <code>ThreadPoolExecutor</code> and
* registering it with the endpoint.
*
! * <p>Handler chains can be set using the contained <code>Binding</code>.
*
* <p>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
--- 35,61 ----
/**
* A Web service endpoint.
*
* <p>Endpoints are created using the static methods defined in this
! * class. An endpoint is always tied to one {@code Binding}
* and one implementor, both set at endpoint creation time.
*
* <p>An endpoint is either in a published or an unpublished state.
! * The {@code publish} methods can be used to start publishing
* an endpoint, at which point it starts accepting incoming requests.
! * Conversely, the {@code stop} method can be used to stop
* accepting incoming requests and take the endpoint down.
* Once stopped, an endpoint cannot be published again.
*
! * <p>An {@code 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 {@code ThreadPoolExecutor} and
* registering it with the endpoint.
*
! * <p>Handler chains can be set using the contained {@code Binding}.
*
* <p>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
*** 112,123 ****
* {@link javax.xml.ws.Endpoint#publish(Object)} methods.
*
*
* @param implementor The endpoint implementor.
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the <code>features
! * </code> parameter will have their default values.
*
*
* @return The newly created endpoint.
* @since 1.7, JAX-WS 2.2
*
--- 112,123 ----
* {@link javax.xml.ws.Endpoint#publish(Object)} methods.
*
*
* @param implementor The endpoint implementor.
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the {@code features
! * } parameter will have their default values.
*
*
* @return The newly created endpoint.
* @since 1.7, JAX-WS 2.2
*
*** 133,143 ****
* 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.
*
* @param bindingId A URI specifying the binding to use. If the bindingID is
! * <code>null</code> and no binding is specified via a BindingType
* annotation then a default SOAP 1.1 / HTTP binding MUST be used.
*
* @param implementor The endpoint implementor.
*
* @return The newly created endpoint.
--- 133,143 ----
* 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.
*
* @param bindingId A URI specifying the binding to use. If the bindingID is
! * {@code null} and no binding is specified via a BindingType
* annotation then a default SOAP 1.1 / HTTP binding MUST be used.
*
* @param implementor The endpoint implementor.
*
* @return The newly created endpoint.
*** 154,171 ****
* 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.
*
* @param bindingId A URI specifying the binding to use. If the bindingID is
! * <code>null</code> and no binding is specified via a BindingType
* annotation then a default SOAP 1.1 / HTTP binding MUST be used.
*
* @param implementor The endpoint implementor.
*
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the <code>features
! * </code> parameter will have their default values.
*
* @return The newly created endpoint.
* @since 1.7, JAX-WS 2.2
*/
public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
--- 154,171 ----
* 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.
*
* @param bindingId A URI specifying the binding to use. If the bindingID is
! * {@code null} and no binding is specified via a BindingType
* annotation then a default SOAP 1.1 / HTTP binding MUST be used.
*
* @param implementor The endpoint implementor.
*
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the {@code features
! * } parameter will have their default values.
*
* @return The newly created endpoint.
* @since 1.7, JAX-WS 2.2
*/
public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
*** 203,215 ****
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a <code>java.lang.SecurityManger</code>
* is being used and the application doesn't have the
! * <code>WebServicePermission("publishEndpoint")</code> permission.
**/
public abstract void publish(String address);
/**
* Creates and publishes an endpoint for the specified implementor
--- 203,215 ----
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a {@code java.lang.SecurityManger}
* is being used and the application doesn't have the
! * {@code WebServicePermission("publishEndpoint")} permission.
**/
public abstract void publish(String address);
/**
* Creates and publishes an endpoint for the specified implementor
*** 229,241 ****
* @param implementor The endpoint implementor.
*
* @return The newly created endpoint.
*
* @throws java.lang.SecurityException
! * If a <code>java.lang.SecurityManger</code>
* is being used and the application doesn't have the
! * <code>WebServicePermission("publishEndpoint")</code> permission.
*
**/
public static Endpoint publish(String address, Object implementor) {
return Provider.provider().createAndPublishEndpoint(address, implementor);
}
--- 229,241 ----
* @param implementor The endpoint implementor.
*
* @return The newly created endpoint.
*
* @throws java.lang.SecurityException
! * If a {@code java.lang.SecurityManger}
* is being used and the application doesn't have the
! * {@code WebServicePermission("publishEndpoint")} permission.
*
**/
public static Endpoint publish(String address, Object implementor) {
return Provider.provider().createAndPublishEndpoint(address, implementor);
}
*** 256,273 ****
* to use. A http: URI MUST result in the SOAP 1.1/HTTP
* binding being used. Implementations may support other
* URI schemes.
* @param implementor The endpoint implementor.
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the <code>features
! * </code> parameter will have their default values.
* @return The newly created endpoint.
*
* @throws java.lang.SecurityException
! * If a <code>java.lang.SecurityManger</code>
* is being used and the application doesn't have the
! * <code>WebServicePermission("publishEndpoint")</code> permission.
* @since 1.7, JAX-WS 2.2
*/
public static Endpoint publish(String address, Object implementor, WebServiceFeature ... features) {
return Provider.provider().createAndPublishEndpoint(address, implementor, features);
}
--- 256,273 ----
* to use. A http: URI MUST result in the SOAP 1.1/HTTP
* binding being used. Implementations may support other
* URI schemes.
* @param implementor The endpoint implementor.
* @param features A list of WebServiceFeature to configure on the
! * endpoint. Supported features not in the {@code features
! * } parameter will have their default values.
* @return The newly created endpoint.
*
* @throws java.lang.SecurityException
! * If a {@code java.lang.SecurityManger}
* is being used and the application doesn't have the
! * {@code WebServicePermission("publishEndpoint")} permission.
* @since 1.7, JAX-WS 2.2
*/
public static Endpoint publish(String address, Object implementor, WebServiceFeature ... features) {
return Provider.provider().createAndPublishEndpoint(address, implementor, features);
}
*** 292,304 ****
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a <code>java.lang.SecurityManger</code>
* is being used and the application doesn't have the
! * <code>WebServicePermission("publishEndpoint")</code> permission.
**/
public abstract void publish(Object serverContext);
/**
* Publishes this endpoint at the provided server context.
--- 292,304 ----
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a {@code java.lang.SecurityManger}
* is being used and the application doesn't have the
! * {@code WebServicePermission("publishEndpoint")} permission.
**/
public abstract void publish(Object serverContext);
/**
* Publishes this endpoint at the provided server context.
*** 325,337 ****
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a <code>java.lang.SecurityManger</code>
* is being used and the application doesn't have the
! * <code>WebServicePermission("publishEndpoint")</code> permission.
* @since 1.7, JAX-WS 2.2
*/
public void publish(HttpContext serverContext) {
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
--- 325,337 ----
*
* @throws java.lang.IllegalStateException
* If the endpoint has been published already or it has been stopped.
*
* @throws java.lang.SecurityException
! * If a {@code java.lang.SecurityManger}
* is being used and the application doesn't have the
! * {@code WebServicePermission("publishEndpoint")} permission.
* @since 1.7, JAX-WS 2.2
*/
public void publish(HttpContext serverContext) {
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
*** 346,363 ****
public abstract void stop();
/**
* Returns true if the endpoint is in the published state.
*
! * @return <code>true</code> if the endpoint is in the published state.
**/
public abstract boolean isPublished();
/**
* Returns a list of metadata documents for the service.
*
! * @return <code>List<javax.xml.transform.Source></code> A list of metadata documents for the service
**/
public abstract List<javax.xml.transform.Source> getMetadata();
/**
* Sets the metadata for this endpoint.
--- 346,363 ----
public abstract void stop();
/**
* Returns true if the endpoint is in the published state.
*
! * @return {@code true} if the endpoint is in the published state.
**/
public abstract boolean isPublished();
/**
* Returns a list of metadata documents for the service.
*
! * @return {@code List<javax.xml.transform.Source>} A list of metadata documents for the service
**/
public abstract List<javax.xml.transform.Source> getMetadata();
/**
* Sets the metadata for this endpoint.
*** 370,403 ****
* has already been published.
**/
public abstract void setMetadata(List<javax.xml.transform.Source> metadata);
/**
! * Returns the executor for this <code>Endpoint</code>instance.
*
* The executor is used to dispatch an incoming request to
* the implementor object.
*
! * @return The <code>java.util.concurrent.Executor</code> to be
* used to dispatch a request.
*
* @see java.util.concurrent.Executor
**/
public abstract java.util.concurrent.Executor getExecutor();
/**
! * Sets the executor for this <code>Endpoint</code> instance.
*
* The executor is used to dispatch an incoming request to
* the implementor object.
*
! * If this <code>Endpoint</code> is published using the
! * <code>publish(Object)</code> method and the specified server
* context defines its own threading behavior, the executor
* may be ignored.
*
! * @param executor The <code>java.util.concurrent.Executor</code>
* to be used to dispatch a request.
*
* @throws SecurityException If the instance does not support
* setting an executor for security reasons (e.g. the
* necessary permissions are missing).
--- 370,403 ----
* has already been published.
**/
public abstract void setMetadata(List<javax.xml.transform.Source> metadata);
/**
! * Returns the executor for this {@code Endpoint}instance.
*
* The executor is used to dispatch an incoming request to
* the implementor object.
*
! * @return The {@code java.util.concurrent.Executor} to be
* used to dispatch a request.
*
* @see java.util.concurrent.Executor
**/
public abstract java.util.concurrent.Executor getExecutor();
/**
! * Sets the executor for this {@code Endpoint} instance.
*
* The executor is used to dispatch an incoming request to
* the implementor object.
*
! * If this {@code Endpoint} is published using the
! * {@code publish(Object)} method and the specified server
* context defines its own threading behavior, the executor
* may be ignored.
*
! * @param executor The {@code java.util.concurrent.Executor}
* to be used to dispatch a request.
*
* @throws SecurityException If the instance does not support
* setting an executor for security reasons (e.g. the
* necessary permissions are missing).
*** 406,486 ****
**/
public abstract void setExecutor(java.util.concurrent.Executor executor);
/**
! * Returns the property bag for this <code>Endpoint</code> instance.
*
* @return Map<String,Object> The property bag
* associated with this instance.
**/
public abstract Map<String,Object> getProperties();
/**
! * Sets the property bag for this <code>Endpoint</code> instance.
*
* @param properties The property bag associated with
* this instance.
**/
public abstract void setProperties(Map<String,Object> properties);
/**
! * Returns the <code>EndpointReference</code> associated with
! * this <code>Endpoint</code> instance.
* <p>
! * If the Binding for this <code>bindingProvider</code> is
* either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
! * <code>W3CEndpointReference</code> MUST be returned.
*
* @param referenceParameters Reference parameters to be associated with the
! * returned <code>EndpointReference</code> instance.
! * @return EndpointReference of this <code>Endpoint</code> instance.
! * If the returned <code>EndpointReference</code> is of type
! * <code>W3CEndpointReference</code> then it MUST contain the
! * the specified <code>referenceParameters</code>.
* @throws WebServiceException If any error in the creation of
! * the <code>EndpointReference</code> or if the <code>Endpoint</code> is
* not in the published state.
! * @throws UnsupportedOperationException If this <code>BindingProvider</code>
* uses the XML/HTTP binding.
*
* @see W3CEndpointReference
*
* @since 1.6, JAX-WS 2.1
**/
public abstract EndpointReference getEndpointReference(Element... referenceParameters);
/**
! * Returns the <code>EndpointReference</code> associated with
! * this <code>Endpoint</code> instance.
*
* @param clazz Specifies the type of EndpointReference that MUST be returned.
* @param referenceParameters Reference parameters to be associated with the
! * returned <code>EndpointReference</code> instance.
! * @return EndpointReference of type <code>clazz</code> of this
! * <code>Endpoint</code> instance.
! * If the returned <code>EndpointReference</code> is of type
! * <code>W3CEndpointReference</code> then it MUST contain the
! * the specified <code>referenceParameters</code>.
* @throws WebServiceException If any error in the creation of
! * the <code>EndpointReference</code> or if the <code>Endpoint</code> is
! * not in the published state or if the <code>clazz</code> is not a supported
! * <code>EndpointReference</code> type.
! * @throws UnsupportedOperationException If this <code>BindingProvider</code>
* uses the XML/HTTP binding.
*
*
* @since 1.6, JAX-WS 2.1
**/
public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
Element... referenceParameters);
/**
! * By settng a <code>EndpointContext</code>, 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.
*
* <p>
--- 406,486 ----
**/
public abstract void setExecutor(java.util.concurrent.Executor executor);
/**
! * Returns the property bag for this {@code Endpoint} instance.
*
* @return Map<String,Object> The property bag
* associated with this instance.
**/
public abstract Map<String,Object> getProperties();
/**
! * Sets the property bag for this {@code Endpoint} instance.
*
* @param properties The property bag associated with
* this instance.
**/
public abstract void setProperties(Map<String,Object> properties);
/**
! * Returns the {@code EndpointReference} associated with
! * this {@code Endpoint} instance.
* <p>
! * If the Binding for this {@code bindingProvider} is
* either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
! * {@code W3CEndpointReference} MUST be returned.
*
* @param referenceParameters Reference parameters to be associated with the
! * returned {@code EndpointReference} instance.
! * @return EndpointReference of this {@code Endpoint} instance.
! * If the returned {@code EndpointReference} is of type
! * {@code W3CEndpointReference} then it MUST contain the
! * the specified {@code referenceParameters}.
* @throws WebServiceException If any error in the creation of
! * the {@code EndpointReference} or if the {@code Endpoint} is
* not in the published state.
! * @throws UnsupportedOperationException If this {@code BindingProvider}
* uses the XML/HTTP binding.
*
* @see W3CEndpointReference
*
* @since 1.6, JAX-WS 2.1
**/
public abstract EndpointReference getEndpointReference(Element... referenceParameters);
/**
! * Returns the {@code EndpointReference} associated with
! * this {@code Endpoint} instance.
*
* @param clazz Specifies the type of EndpointReference that MUST be returned.
* @param referenceParameters Reference parameters to be associated with the
! * returned {@code EndpointReference} instance.
! * @return EndpointReference of type {@code clazz} of this
! * {@code Endpoint} instance.
! * If the returned {@code EndpointReference} is of type
! * {@code W3CEndpointReference} then it MUST contain the
! * the specified {@code referenceParameters}.
* @throws WebServiceException If any error in the creation of
! * the {@code EndpointReference} or if the {@code Endpoint} is
! * not in the published state or if the {@code clazz} is not a supported
! * {@code EndpointReference} type.
! * @throws UnsupportedOperationException If this {@code BindingProvider}
* uses the XML/HTTP binding.
*
*
* @since 1.6, JAX-WS 2.1
**/
public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
Element... referenceParameters);
/**
! * By settng a {@code 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.
*
* <p>
< prev index next >