|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.rpc Class ServiceFactory
java.lang.Object javax.xml.rpc.ServiceFactory
public abstract class ServiceFactory
- extends Object
javax.xml.rpc.ServiceFactory
是一个抽象类,提供用于创建类型为 javax.xml.rpc.Service
的实例的工厂。此抽象类遵循抽象静态工厂设计模式。这使基于 J2SE 的客户端能够以可移植方式创建 Service
实例,而无需使用 Service
实现类的构造方法。
ServiceFactory 实现类是使用系统属性 SERVICEFACTORY_PROPERTY
设置的。
version | 1.1 |
See also | javax.xml.rpc.Service |
The javax.xml.rpc.ServiceFactory
is an abstract class
that provides a factory for the creation of instances of the type
javax.xml.rpc.Service
. This abstract class follows the
abstract static factory design pattern. This enables a J2SE based
client to create a Service instance
in a portable manner
without using the constructor of the Service
implementation class.
The ServiceFactory implementation class is set using the
system property SERVICEFACTORY_PROPERTY
.
- Version:
- 1.1
- Author:
- Rahul Sharma, Roberto Chinnici
- See Also:
Service
Field Summary | |
---|---|
static String |
SERVICEFACTORY_PROPERTY
A constant representing the property used to lookup the name of a ServiceFactory implementation
class. |
Constructor Summary | |
---|---|
protected |
ServiceFactory()
|
Method Summary | |
---|---|
abstract Service |
createService(QName serviceName)
Create a Service instance. |
abstract Service |
createService(URL wsdlDocumentLocation,
QName serviceName)
Create a Service instance. |
abstract Service |
loadService(Class serviceInterface)
Create an instance of the generated service implementation class for a given service interface, if available. |
abstract Service |
loadService(URL wsdlDocumentLocation,
Class serviceInterface,
Properties properties)
Create an instance of the generated service implementation class for a given service interface, if available. |
abstract Service |
loadService(URL wsdlDocumentLocation,
QName serviceName,
Properties properties)
Create an instance of the generated service implementation class for a given service, if available. |
static ServiceFactory |
newInstance()
Gets an instance of the ServiceFactory
Only one copy of a factory exists and is returned to the
application each time this method is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
英文文档:
SERVICEFACTORY_PROPERTY
public static final String SERVICEFACTORY_PROPERTY
- A constant representing the property used to lookup the
name of a
ServiceFactory
implementation class.- See Also:
- Constant Field Values
Constructor Detail |
---|
protected
ServiceFactory()
英文文档:
ServiceFactory
protected ServiceFactory()
Method Detail |
---|
public static ServiceFactory
newInstance() throws ServiceException
获取 ServiceFactory
实例。
仅存在一个工厂副本,每次调用此方法时,都会将该副本返回给应用程序。
可以通过设置 javax.xml.rpc.ServiceFactory 系统属性重写要使用的实现类。
newInstance
public static ServiceFactory newInstance() throws ServiceException
- Gets an instance of the
ServiceFactory
Only one copy of a factory exists and is returned to the application each time this method is called.
The implementation class to be used can be overridden by setting the javax.xml.rpc.ServiceFactory system property.
- Throws:
ServiceException
abstract public Service
createService(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName) throws ServiceException
创建 Service
实例。
wsdlDocumentLocation | 服务 WSDL 文档位置的 URL |
serviceName | 服务的 QName |
Throws | ServiceException: 如果在创建指定服务的过程中发生任何错误 |
createService
public abstract Service createService(URL wsdlDocumentLocation, QName serviceName) throws ServiceException
- Create a
Service
instance. - Parameters:
wsdlDocumentLocation
- URL for the WSDL document location for the serviceserviceName
- QName for the service- Throws:
ServiceException
- If any error in creation of the specified service
abstract public Service
createService(javax.xml.namespace.QName serviceName) throws ServiceException
创建 Service
实例。
serviceName | 服务的 QName |
Throws | ServiceException: 如果在创建指定服务的过程中发生任何错误 |
createService
public abstract Service createService(QName serviceName) throws ServiceException
- Create a
Service
instance. - Parameters:
serviceName
- QName for the service- Throws:
ServiceException
- If any error in creation of the specified service
abstract public Service
loadService(Class<T> serviceInterface) throws ServiceException
创建用于给定服务接口(如果可用)的已生成服务实现类的实例。
serviceInterface | 服务接口 |
Throws | ServiceException: 如果在创建指定服务时发生错误,包括无法定位生成的服务实现类的情况 |
loadService
public abstract Service loadService(Class serviceInterface) throws ServiceException
- Create an instance of the generated service implementation class
for a given service interface, if available.
- Parameters:
serviceInterface
- Service interface- Throws:
ServiceException
- If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located
abstract public Service
loadService(java.net.URL wsdlDocumentLocation, Class<T> serviceInterface, java.util.Properties properties) throws ServiceException
创建用于给定服务接口(如果可用)的已生成服务实现类的实例。
实现可以使用提供的 wsdlDocumentLocation
和 properties
帮助定位生成的实现类。如果不存在这种类,则抛出 ServiceException
。
wsdlDocumentLocation | 指向服务的 WSDL 文档位置的 URL;或者为 mull |
serviceInterface | 服务接口 |
properties | 可帮助定位生成的服务实现类的特定于实现的属性集 |
Throws | ServiceException: 如果在创建指定服务时发生错误,包括无法定位生成的服务实现类的情况 |
loadService
public abstract Service loadService(URL wsdlDocumentLocation, Class serviceInterface, Properties properties) throws ServiceException
- Create an instance of the generated service implementation class
for a given service interface, if available.
An implementation may use the provided
wsdlDocumentLocation
andproperties
to help locate the generated implementation class. If no such class is present, aServiceException
will be thrown. - Parameters:
wsdlDocumentLocation
- URL for the WSDL document location for the service or nullserviceInterface
- Service interfaceproperties
- A set of implementation-specific properties to help locate the generated service implementation class- Throws:
ServiceException
- If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located
abstract public Service
loadService(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName, java.util.Properties properties) throws ServiceException
创建用于给定服务(如果可用)的已生成服务实现类的实例。
该服务使用 wsdlDocumentLocation
和 serviceName
参数唯一标识。
实现可以使用提供的 properties
帮助定位生成的实现类。如果不存在这种类,则抛出 ServiceException
。
wsdlDocumentLocation | 指向服务的 WSDL 文档位置的 URL;或者为 mull |
serviceName | 服务的限定名称 |
properties | 可帮助定位生成的服务实现类的特定于实现的属性集 |
Throws | ServiceException: 如果在创建指定服务时发生错误,包括无法定位生成的服务实现类的情况 |
loadService
public abstract Service loadService(URL wsdlDocumentLocation, QName serviceName, Properties properties) throws ServiceException
- Create an instance of the generated service implementation
class for a given service, if available.
The service is uniquely identified by the
wsdlDocumentLocation
andserviceName
arguments. An implementation may use the providedproperties
to help locate the generated implementation class. If no such class is present, aServiceException
will be thrown. - Parameters:
wsdlDocumentLocation
- URL for the WSDL document location for the service or nullserviceName
- Qualified name for the serviceproperties
- A set of implementation-specific properties to help locate the generated service implementation class- Throws:
ServiceException
- If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!