public abstract class Endpoint extends Object
使用在这个类中定义的静态方法创建端点。一个端点总是与一个Binding
和一个执行者,都设置在终点的创建时间。
一个端点是在已发表或未发表的状态。该方法可用于publish
开始出版一个端点,这时它开始接受传入的请求。相反,该stop
方法可用于停止接受传入的请求并把终点了。一旦停止,一个端点不能再次发表。
一个Executor
可设置为端点来更好地控制用于传入请求的线程调度。例如,线程池在一定的参数可以通过创建一个ThreadPoolExecutor
登记它与端点启用。
处理器链可以使用包含Binding
。
一个端点可能有一个列表的元数据文件,如WSDL和XML文件绑定到它。在出版的时候,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 。
|
abstract EndpointReference |
getEndpointReference(Element... referenceParameters)
返回与此
Endpoint 实例关联的
EndpointReference 。
|
abstract Executor |
getExecutor()
返回此
Endpoint instance遗嘱执行人。
|
abstract Object |
getImplementor()
返回此终结点的实现对象。
|
abstract List<Source> |
getMetadata()
返回服务的元数据文档的列表。
|
abstract Map<String,Object> |
getProperties()
返回此
Endpoint 实例属性包。
|
abstract boolean |
isPublished()
如果端点处于已发布状态,则返回真。
|
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 HTTP绑定必须使用1.1 /。
implementor
-终端设备。
public static Endpoint create(String bindingId, Object implementor, WebServiceFeature... features)
新创建的端点可以通过调用一个方法的publish(String)
和publish(Object)
发表。
bindingId
-一个URI指定的结合使用。如果bindingid是
null
没有绑定指定通过一个bindingtype注释然后默认SOAP HTTP绑定必须使用1.1 /。
implementor
-终端设备。
features
-目录webservicefeature配置的端点。支持的功能不在
features
参数有默认值。
public abstract Binding getBinding()
public abstract Object getImplementor()
public abstract void publish(String address)
publish(Object)
法代替。
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必须导致肥皂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必须导致肥皂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文件)
IllegalStateException
如果终点已经出版。
public abstract Executor getExecutor()
Endpoint
instance遗嘱执行人。执行器是用来调度传入请求的设备对象。
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
-属性包与此相关的实例。
public abstract EndpointReference getEndpointReference(Element... referenceParameters)
Endpoint
实例关联的
EndpointReference
。
如果结合这bindingProvider
是soap1.1/http或soap1.2/http,然后W3CEndpointReference
必须返回。
referenceParameters
参考参数和返回
EndpointReference
实例关联。
Endpoint
实例endpointreference。如果返回类型是
EndpointReference
W3CEndpointReference
那么它必须包含指定的
referenceParameters
。
WebServiceException
-如果有错误的
EndpointReference
创作或者
Endpoint
不在公布的国家。
UnsupportedOperationException
-如果这
BindingProvider
使用XML/HTTP绑定。
W3CEndpointReference
public abstract <T extends EndpointReference> T getEndpointReference(类<T> clazz, Element... referenceParameters)
Endpoint
实例关联的
EndpointReference
。
clazz
指定endpointreference类型必须返回。
referenceParameters
参考参数和返回
EndpointReference
实例关联。
Endpoint
实例类型
clazz
EndpointReference。如果返回类型是
EndpointReference
W3CEndpointReference
那么它必须包含指定的
referenceParameters
。
WebServiceException
-如果有错误的
EndpointReference
创作或者
Endpoint
不在公布的国家或者
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.