ServiceFactory (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.xml.rpc Class ServiceFactory

java.lang.Object
  extended by javax.xml.rpc.ServiceFactory

public abstract class ServiceFactory
extends Object

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.

版本:
1.1
作者:
Rahul Sharma, Roberto Chinnici
另请参见:
Service

字段摘要
static String SERVICEFACTORY_PROPERTY
          A constant representing the property used to lookup the name of a ServiceFactory implementation class.
 
构造器摘要
protected ServiceFactory()
           
 
方法摘要
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.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

SERVICEFACTORY_PROPERTY

public static final String SERVICEFACTORY_PROPERTY
A constant representing the property used to lookup the name of a ServiceFactory implementation class.

另请参见:
常量字段

构造器详细信息

ServiceFactory

protected 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.

抛出异常:
ServiceException

createService

public abstract Service createService(URL wsdlDocumentLocation,
                                      QName serviceName)
                               throws ServiceException
Create a Service instance.

参数:
wsdlDocumentLocation - URL for the WSDL document location for the service
serviceName - QName for the service
抛出异常:
ServiceException - If any error in creation of the specified service

createService

public abstract Service createService(QName serviceName)
                               throws ServiceException
Create a Service instance.

参数:
serviceName - QName for the service
抛出异常:
ServiceException - If any error in creation of the specified service

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.

参数:
serviceInterface - Service interface
抛出异常:
ServiceException - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

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 and properties to help locate the generated implementation class. If no such class is present, a ServiceException will be thrown.

参数:
wsdlDocumentLocation - URL for the WSDL document location for the service or null
serviceInterface - Service interface
properties - A set of implementation-specific properties to help locate the generated service implementation class
抛出异常:
ServiceException - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

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 and serviceName arguments. An implementation may use the provided properties to help locate the generated implementation class. If no such class is present, a ServiceException will be thrown.

参数:
wsdlDocumentLocation - URL for the WSDL document location for the service or null
serviceName - Qualified name for the service
properties - A set of implementation-specific properties to help locate the generated service implementation class
抛出异常:
ServiceException - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.