|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.xml.ws Class Endpoint
java.lang.Object 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 one based on the annotations present on the implementor.
- 从以下版本开始:
- JAX-WS 2.0
- 另请参见:
Binding
,BindingType
,SOAPBinding
,Executor
字段摘要 | |
---|---|
static String |
WSDL_PORT
Standard property: name of WSDL port. |
static String |
WSDL_SERVICE
Standard property: name of WSDL service. |
构造器摘要 | |
---|---|
Endpoint()
|
方法摘要 | |
---|---|
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 Endpoint instance. |
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. |
类方法继承 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
WSDL_SERVICE
public static final String WSDL_SERVICE
- Standard property: name of WSDL service.
Type: javax.xml.namespace.QName
- 另请参见:
- 常量字段
WSDL_PORT
public static final String WSDL_PORT
- Standard property: name of WSDL port.
Type: javax.xml.namespace.QName
- 另请参见:
- 常量字段
构造器详细信息 |
---|
Endpoint
public Endpoint()
方法详细信息 |
---|
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 javax.xml.ws.Endpoint#publish(String) and javax.xml.ws.Endpoint#publish(Object) methods.
- 参数:
implementor
- The endpoint implementor.- 返回:
- 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 javax.xml.ws.Endpoint#publish(String) and javax.xml.ws.Endpoint#publish(Object) methods.
- 参数:
bindingId
- A URI specifying the binding to use. If the bindingID isnull
and no binding is specified via a BindingType annotation then a default SOAP 1.1 / HTTP binding MUST be used.implementor
- The endpoint implementor.- 返回:
- The newly created endpoint.
getBinding
public abstract Binding getBinding()
- Returns the binding for this endpoint.
- 返回:
- The binding for this endpoint
getImplementor
public abstract Object getImplementor()
- Returns the implementation object for this endpoint.
- 返回:
- The implementor for this 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 javax.xml.ws.Endpoint#publish(Object) method instead.
- 参数:
address
- A URI specifying the address to use. The address must be compatible with the binding specified at the time the endpoint was created.- 抛出异常:
IllegalArgumentException
- If the provided address URI is not usable in conjunction with the endpoint's binding.IllegalStateException
- If the endpoint has been published already or it has been stopped.
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 javax.xml.ws.Endpoint#create(String,Object) and javax.xml.ws.Endpoint#publish(Object) method instead.
- 参数:
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.- 返回:
- The newly created endpoint.
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.
- 参数:
serverContext
- An object representing a server context to be used for publishing the endpoint.- 抛出异常:
IllegalArgumentException
- If the provided server context is not supported by the implementation or turns out to be unusable in conjunction with the endpoint's binding.IllegalStateException
- If the endpoint has been published already or it has been stopped.
stop
public abstract void stop()
- Stops publishing this endpoint.
If the endpoint is not in a published state, this method
has not effect.
isPublished
public abstract boolean isPublished()
- Returns true if the endpoint is in the published state.
- 返回:
true
if the endpoint is in the published state.
getMetadata
public abstract List<Source> getMetadata()
- Returns a list of metadata documents for the service.
- 返回:
List<javax.xml.transform.Source>
A list of metadata documents for the service
setMetadata
public abstract void setMetadata(List<Source> metadata)
- Sets the metadata for this endpoint.
- 参数:
metadata
- A list of XML document sources containing metadata information for the endpoint (e.g. WSDL or XML Schema documents)- 抛出异常:
IllegalStateException
- If the endpoint has already been published.
getExecutor
public abstract Executor getExecutor()
- Returns the executor for this
Endpoint
instance. The executor is used to dispatch an incoming request to the implementor object. - 返回:
- The
java.util.concurrent.Executor
to be used to dispatch a request. - 另请参见:
Executor
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 thisEndpoint
is published using thepublish(Object)
method and the specified server context defines its own threading behavior, the executor may be ignored. - 参数:
executor
- Thejava.util.concurrent.Executor
to be used to dispatch a request.- 抛出异常:
SecurityException
- If the instance does not support setting an executor for security reasons (e.g. the necessary permissions are missing).- 另请参见:
Executor
getProperties
public abstract Map<String,Object> getProperties()
- Returns the property bag for this
Endpoint
instance. - 返回:
- Map<String,Object> The property bag associated with this instance.
setProperties
public abstract void setProperties(Map<String,Object> properties)
- Sets the property bag for this
Endpoint
instance. - 参数:
properties
- The property bag associated with this instance.
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.