org.codehaus.xfire.picocontainer
Class PicoObjectServiceFactory

java.lang.Object
  extended by org.codehaus.xfire.service.binding.ObjectServiceFactory
      extended by org.codehaus.xfire.picocontainer.PicoObjectServiceFactory
All Implemented Interfaces:
ServiceFactory

public class PicoObjectServiceFactory
extends ObjectServiceFactory

PicoContainer specialization of Java objects-specific implementation of the ServiceFactory interface which uses a given picocontainer to pick service objects instance when it's about to invoke them.

Author:
Jose Peleteiro

Field Summary
 
Fields inherited from class org.codehaus.xfire.service.binding.ObjectServiceFactory
CREATE_DEFAULT_BINDINGS, PORT_TYPE, SCHEMAS, SCOPE, SOAP11_TRANSPORTS, SOAP12_TRANSPORTS, STYLE, USE
 
Constructor Summary
PicoObjectServiceFactory(PicoContainer pico)
           
PicoObjectServiceFactory(PicoContainer pico, TransportManager transportManager, BindingProvider provider)
           
 
Method Summary
 Service create(java.lang.Class clazz)
          Creates a service from the specified class.
 Service create(java.lang.Class clazz, java.util.Map properties)
          Creates a service from the specified class.
 Service create(java.lang.Class clazz, javax.xml.namespace.QName name, java.net.URL wsdlUrl, java.util.Map properties)
          Creates a service via create(Class).
 Service create(java.lang.Class clazz, java.lang.String name, java.lang.String namespace, java.util.Map properties)
          Creates a service from the specified class, soap version, style and use.
protected  Service prepare(Service endpoint)
          Prepare an ObjectService to use pico.
 
Methods inherited from class org.codehaus.xfire.service.binding.ObjectServiceFactory
addFault, addIgnoredMethods, addOperation, addSoap11Transport, addSoap12Transport, configureHeaders, createBindingOperation, createBindings, createEndpoint, createInputMessageName, createOutputMessageName, createSoap11Binding, createSoap12Binding, createSoapBinding, getAction, getBindingProvider, getFaultName, getInParameterName, getMEP, getOperationName, getOutParameterName, getSoap11Transports, getSoap12Transports, getStyle, getTargetNamespace, getTransportManager, getUse, getWsdlBuilderFactory, hasOutMessage, initializeFaults, initializeOperations, isAsync, isBindingCreationEnabled, isCustomFaultsEnabled, isFaultInfoClass, isHeader, isInParam, isOutParam, isValidMethod, isVoidOneWay, makeServiceNameFromClassName, registerHandlers, setBindingCreationEnabled, setBindingProvider, setCustomFaultsEnabled, setStyle, setTransportManager, setUse, setVoidOneWay, setWsdlBuilderFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PicoObjectServiceFactory

public PicoObjectServiceFactory(PicoContainer pico)

PicoObjectServiceFactory

public PicoObjectServiceFactory(PicoContainer pico,
                                TransportManager transportManager,
                                BindingProvider provider)
Method Detail

create

public Service create(java.lang.Class clazz,
                      java.lang.String name,
                      java.lang.String namespace,
                      java.util.Map properties)
Description copied from class: ObjectServiceFactory
Creates a service from the specified class, soap version, style and use. The returned service will have a name based on the class name, and a namespace based on the class package.

Some parameters can be null, and will be replaced with sensible defaults if so. See the specific parameters for more info.

Specified by:
create in interface ServiceFactory
Overrides:
create in class ObjectServiceFactory
Parameters:
clazz - The service class used to populate the operations and parameters.
name - The name of the service. If null, a name will be generated from the class name.
namespace - The default namespace of the service. If null, a namespace will be generated from the class package.
properties - Service specific properties which the ServiceFactory will use to create the service.
Returns:
The service.

create

public Service create(java.lang.Class clazz,
                      java.util.Map properties)
Description copied from class: ObjectServiceFactory
Creates a service from the specified class. The service name will be the unqualified class name. The namespace will be based on the package. The service will use soap version 1.1, wrapped style, and literal use.

Specified by:
create in interface ServiceFactory
Overrides:
create in class ObjectServiceFactory
Parameters:
clazz - The service class used to populate the operations and parameters. If the class is an interface, then the implementation class that implements that interface must be set via AbstractContext.setProperty(String, Object) with the property key being ObjectInvoker.SERVICE_IMPL_CLASS
properties - Properties to set on the service and use in construction.
Returns:
The service.

create

public Service create(java.lang.Class clazz,
                      javax.xml.namespace.QName name,
                      java.net.URL wsdlUrl,
                      java.util.Map properties)
Description copied from class: ObjectServiceFactory
Creates a service via create(Class). It then configures the bindings and endpoints on the service via the WSDL.

Specified by:
create in interface ServiceFactory
Overrides:
create in class ObjectServiceFactory
Parameters:
clazz - The service class for the wsdl.
wsdlUrl - The WSDL URL.
Returns:

create

public Service create(java.lang.Class clazz)
Description copied from class: ObjectServiceFactory
Creates a service from the specified class. The service name will be the unqualified class name. The namespace will be based on the package. The service will use soap version 1.1, wrapped style, and literal use.

Specified by:
create in interface ServiceFactory
Overrides:
create in class ObjectServiceFactory
Parameters:
clazz - The service class used to populate the operations and parameters. If the class is an interface, then the implementation class that implements that interface must be set via AbstractContext.setProperty(String, Object) with the property key being ObjectInvoker.SERVICE_IMPL_CLASS
Returns:
The service.

prepare

protected Service prepare(Service endpoint)
Prepare an ObjectService to use pico.



Copyright © 2004-2006 Envoi Solutions LLC. All Rights Reserved.