public abstract class Endpoint extends Object
 端点是使用此类中定义的静态方法创建的。 端点总是绑定到一个Binding和一个实现者,都设置在端点创建时间。 
 端点处于发布状态或未发布状态。 publish方法可用于开始发布端点,此时它将开始接收传入的请求。 相反, stop方法可用于停止接收传入请求并使端点停止。 一旦停止,端点不能再次发布。 
 可以在端点上设置Executor ,以便更好地控制用于调度传入请求的线程。 例如,可以通过创建ThreadPoolExecutor并将其注册到端点来启用具有某些参数的线程池。 
 处理程序链可以使用包含的设置Binding 。 
端点可以具有绑定到它的元数据文档列表,例如WSDL和XMLSchema文档。 在发布时,JAX-WS实现将尽可能地重用尽可能多的元数据,而不是基于实现者上存在的注释生成新元数据。
Binding , BindingType , SOAPBinding , Executor 
       | Modifier and Type | Field and Description | 
|---|---|
| static String | WSDL_PORT
              标准属性:WSDL端口的名称。 
             | 
| static String | WSDL_SERVICE
              标准属性:WSDL服务的名称。 
             | 
| Constructor and Description | 
|---|
| Endpoint() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Endpoint | create(Object implementor)
              创建具有指定的实现对象的端点。 
             | 
| static Endpoint | create(Object implementor, WebServiceFeature... features)
              创建具有指定的实现者对象和Web服务功能的端点。 
             | 
| static Endpoint | create(String bindingId, Object implementor)
              创建具有指定绑定类型和实现方对象的端点。 
             | 
| static Endpoint | create(String bindingId, Object implementor, WebServiceFeature... features)
              创建具有指定绑定类型,实现方对象和Web服务功能的端点。 
             | 
| abstract Binding | getBinding()
              返回此端点的绑定。 
             | 
| abstract <T extends EndpointReference> | getEndpointReference(类<T> clazz, Element... referenceParameters)
              返回与此 
              Endpoint实例EndpointReference联的Endpoint。 | 
| abstract EndpointReference | getEndpointReference(Element... referenceParameters)
              返回 
              EndpointReference与此相关Endpoint实例。 | 
| abstract Executor | getExecutor()
              返回此 
              Endpoint实例的执行程序。 | 
| abstract Object | getImplementor()
              返回此端点的实现对象。 
             | 
| abstract List<Source> | getMetadata()
              返回服务的元数据文档列表。 
             | 
| abstract Map<String,Object> | getProperties()
              返回此 
              Endpoint实例的资源袋。 | 
| abstract boolean | isPublished()
              如果端点处于已发布状态,则返回true。 
             | 
| void | publish(HttpContext serverContext)
              在提供的服务器上下文中发布此端点。 
             | 
| abstract void | publish(Object serverContext)
              在提供的服务器上下文中发布此端点。 
             | 
| abstract void | publish(String address)
              在给定地址发布此端点。 
             | 
| static Endpoint | publish(String address, Object implementor)
              在给定的地址创建并发布指定的实现者对象的端点。 
             | 
| static Endpoint | publish(String address, Object implementor, WebServiceFeature... features)
              在给定的地址创建并发布指定的实现者对象的端点。 
             | 
| void | setEndpointContext(EndpointContext ctxt)
              通过设置一个 
              EndpointContext,JAX-WS运行时知道应用程序中其他端点的地址。 | 
| abstract void | setExecutor(Executor executor)
              设置这个 
              Endpoint实例的执行器。 | 
| abstract void | setMetadata(List<Source> metadata)
              设置此端点的元数据。 
             | 
| abstract void | setProperties(Map<String,Object> properties)
              设置此 
              Endpoint实例的属性包。 | 
| abstract void | stop()
              停止发布此端点。 
             | 
public static final String WSDL_SERVICE
键入:javax.xml.namespace.QName
public static final String WSDL_PORT
键入:javax.xml.namespace.QName
public static Endpoint create(Object implementor)
 新创建的端点可以通过调用publish(String)和publish(Object)之一来发布。 
implementor - 端点实现者。 
           public static Endpoint create(Object implementor, WebServiceFeature... features)
 可以通过调用publish(String)和publish(Object)方法之一来发布新创建的端点。 
implementor - 端点实现者。 
           features - 要在端点上配置的WebServiceFeature列表。 
            支持的功能不是在features参数将其默认值。 
           public static Endpoint create(String bindingId, Object implementor)
 新创建的端点可以通过调用publish(String)和publish(Object)之一来发布。 
bindingId - 指定要使用的绑定的URI。 
            如果bindingID是null ,并且没有通过BindingType注释指定绑定,则必须使用默认的SOAP 1.1 / HTTP绑定。 
           implementor - 端点实现者。 
           public static Endpoint create(String bindingId, Object implementor, WebServiceFeature... features)
 新创建的端点可以通过调用publish(String)和publish(Object)之一来发布。 
bindingId - 指定要使用的绑定的URI。 
            如果bindingID为null ,并且通过BindingType注释未指定绑定,则必须使用默认的SOAP 1.1 / HTTP绑定。 
           implementor - 端点实现者。 
           features - 要在端点上配置的WebServiceFeature列表。 
            支持的功能不是在features参数将其默认值。 
           public abstract Binding getBinding()
public abstract Object getImplementor()
public abstract void publish(String address)
address - 指定要使用的地址的URI。 
            地址必须与在创建端点时指定的绑定兼容。 
           IllegalArgumentException - 如果提供的地址URI不能与端点绑定一起使用。 
           IllegalStateException - 如果端点已经被发布或已经被停止。 
           SecurityException -如果 
            java.lang.SecurityManger正在使用和应用程序不具有 
            WebServicePermission("publishEndpoint")权限。 
           public static Endpoint publish(String address, Object implementor)
 将使用一些默认配置由JAX-WS实现创建和配置必要的服务器基础架构。 为了更好地控制服务器配置,请使用create(String,Object)和publish(Object)方法。 
address - 指定要使用的地址和传输/协议的URI。 
            http:URI必须导致使用SOAP 1.1 / HTTP绑定。 
            实现可能支持其他URI方案。 
           implementor - 端点实现者。 
           SecurityException -如果 
            java.lang.SecurityManger正在使用和应用程序不具有 
            WebServicePermission("publishEndpoint")权限。 
           public static Endpoint publish(String address, Object implementor, WebServiceFeature... features)
 将使用一些默认配置由JAX-WS实现创建和配置必要的服务器基础架构。 为了更好地控制服务器配置,请使用create(String,Object)和publish(Object)方法。 
address - 指定要使用的地址和传输/协议的URI。 
            http:URI必须导致使用SOAP 1.1 / HTTP绑定。 
            实现可能支持其他URI方案。 
           implementor - 端点实现者。 
           features - 要在端点上配置的WebServiceFeature列表。 
            支持的功能不是在features参数将其默认值。 
           SecurityException -如果 
            java.lang.SecurityManger正在使用和应用程序不具有 
            WebServicePermission("publishEndpoint")权限。 
           public abstract void publish(Object serverContext)
serverContext - 表示要用于发布端点的服务器上下文的对象。 
           IllegalArgumentException - 如果提供的服务器上下文不被实现支持,或者结果与端点绑定无关。 
           IllegalStateException - 如果端点已经被发布或已经被停止。 
           SecurityException -如果 
            java.lang.SecurityManger正在使用和应用程序不具有 
            WebServicePermission("publishEndpoint")权限。 
           public void publish(HttpContext serverContext)
这意味着容器开发人员能够可移植地发布端点,而不是为最终开发人员发布端点。
serverContext - 表示要用于发布端点的服务器上下文的对象。 
           IllegalArgumentException - 如果提供的服务器上下文不被实现支持或结果与端点的绑定结合使用不可用。 
           IllegalStateException - 如果端点已经被发布或已经被停止。 
           SecurityException -如果 
            java.lang.SecurityManger正在使用和应用程序不具有 
            WebServicePermission("publishEndpoint")权限。 
           public abstract void stop()
public abstract boolean isPublished()
true如果端点处于已发布状态。 
           public abstract List<Source> getMetadata()
List<javax.xml.transform.Source>服务的元数据文档列表 
           public abstract void setMetadata(List<Source> metadata)
metadata - 包含端点元数据信息的XML文档源列表(例如WSDL或XML Schema文档) 
           IllegalStateException - 如果端点已经发布。 
           public abstract Executor getExecutor()
Endpoint实例的执行程序。 
           执行器用于向实现者对象发送传入请求。 
          java.util.concurrent.Executor 。 
           Executor 
           public abstract void setExecutor(Executor executor)
Endpoint实例的执行程序。 
           执行器用于向实现者对象发送传入请求。 
           如果这个Endpoint是使用publish(Object)方法发布的,并且指定的服务器上下文定义了自己的线程行为,则执行器可能会被忽略。 
          executor - 用于发送请求的 
            java.util.concurrent.Executor 。 
           SecurityException - 如果实例不支持以安全原因设置执行程序(例如缺少必需的权限)。 
           Executor 
           public abstract Map<String,Object> getProperties()
Endpoint实例的资源袋。 
          public abstract void setProperties(Map<String,Object> properties)
Endpoint实例的属性包。 
          properties - 与此实例 
            properties的财产袋。 
           public abstract EndpointReference getEndpointReference(Element... referenceParameters)
EndpointReference与此相关Endpoint实例。 
            如果此bindingProvider的绑定是SOAP1.1 / HTTP或SOAP1.2 / HTTP,则必须返回一个W3CEndpointReference 。 
referenceParameters - 与返回的 
            EndpointReference实例相关联的 
            EndpointReference参数。 
           Endpoint实例。 
            如果返回的EndpointReference是W3CEndpointReference那么它必须包含指定的referenceParameters 。 
           WebServiceException -如果在创建的任何错误 
            EndpointReference或者如果 
            Endpoint不处于发布状态。 
           UnsupportedOperationException - 如果这 
            BindingProvider使用XML / HTTP绑定。 
           W3CEndpointReference 
           public abstract <T extends EndpointReference> T getEndpointReference(类<T> clazz, Element... referenceParameters)
EndpointReference与此相关 
           Endpoint实例。 
          clazz - 指定必须返回的EndpointReference类型。 
           referenceParameters - 与返回的 
            EndpointReference实例相关联的 
            EndpointReference参数。 
           Endpoint实例的类型为clazz的Endpoint 。 
            如果返回的EndpointReference是W3CEndpointReference那么它必须包含指定的referenceParameters 。 
           WebServiceException - 如果创建 
            EndpointReference或 
            Endpoint未 
            EndpointReference任何错误或 
            clazz不支持 
            EndpointReference类型。 
           UnsupportedOperationException - 如果这 
            BindingProvider使用XML / HTTP绑定。 
           public void setEndpointContext(EndpointContext ctxt)
EndpointContext ,JAX-WS运行时知道应用程序中其他端点的地址。 
           如果多个端点共享WSDL的不同端口,则在访问WSDL时修复多个端口地址。 
           这需要在发布端点之前进行设置。
ctxt - 为多个端点共享 
           IllegalStateException - 如果端点已经被发布或已经被停止。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.