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

Constructor Summary
PicoObjectServiceFactory(org.picocontainer.defaults.ObjectReference picoReference)
           
PicoObjectServiceFactory(org.picocontainer.defaults.ObjectReference picoReference, TransportManager transportManager, BindingProvider provider)
           
PicoObjectServiceFactory(org.picocontainer.PicoContainer pico)
           
PicoObjectServiceFactory(org.picocontainer.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.lang.String name, java.lang.String namespace, java.util.Map properties)
          Creates a service from the specified class, soap version, style and use.
 Service create(java.lang.Class clazz, java.lang.String name, java.lang.String namespace, SoapVersion version, java.lang.String style, java.lang.String use, java.util.Map properties)
           
 Service create(java.lang.Class clazz, java.net.URL wsdlUrl)
          Create a service from a WSDL file.
protected  Service prepare(Service endpoint)
          Prepare an ObjectService to use pico.
 
Methods inherited from class org.codehaus.xfire.service.binding.ObjectServiceFactory
addIgnoredMethods, addOperation, create, getAction, getBindingProvider, getInParameterName, getMEP, getOperationName, getOutParameterName, getSoapVersion, getStyle, getTransportManager, getUse, getWsdlBuilderFactory, initializeOperations, isAsync, isHeader, isValidMethod, isVoidOneWay, makeServiceNameFromClassName, registerHandlers, setBindingProvider, setSoapVersion, 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(org.picocontainer.PicoContainer pico)

PicoObjectServiceFactory

public PicoObjectServiceFactory(org.picocontainer.defaults.ObjectReference picoReference)

PicoObjectServiceFactory

public PicoObjectServiceFactory(org.picocontainer.PicoContainer pico,
                                TransportManager transportManager,
                                BindingProvider provider)

PicoObjectServiceFactory

public PicoObjectServiceFactory(org.picocontainer.defaults.ObjectReference picoReference,
                                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.lang.String name,
                      java.lang.String namespace,
                      SoapVersion version,
                      java.lang.String style,
                      java.lang.String use,
                      java.util.Map properties)
Overrides:
create in class ObjectServiceFactory

create

public Service create(java.lang.Class clazz,
                      java.net.URL wsdlUrl)
               throws java.lang.Exception
Description copied from interface: ServiceFactory
Create a service from a WSDL file. NOTE: This probably doesn't work yet.

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

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 Service.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-2005 Codehaus. All Rights Reserved.