JBoss Wise API

org.jboss.wise.core.client
Class SpiLoader

java.lang.Object
  extended by org.jboss.wise.core.client.SpiLoader

public class SpiLoader
extends java.lang.Object

Author:
stefano.maestri@javalinux.it

Constructor Summary
SpiLoader()
           
 
Method Summary
static java.lang.Object loadFromServices(java.lang.String propertyName)
          Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
static java.lang.Object loadFromSystemProperty(java.lang.String propertyName)
          Use the system property
static java.lang.Object loadService(java.lang.String propertyName, java.lang.String defaultFactory)
          This method uses the algorithm below 1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpiLoader

public SpiLoader()
Method Detail

loadService

public static java.lang.Object loadService(java.lang.String propertyName,
                                           java.lang.String defaultFactory)
This method uses the algorithm below 1. If a system property with the name org.jboss.wise.client.builder.WSDynamicClientBuilder is defined, then its value is used as the name of the implementation class. If a system property with the name org.jboss.wise.consumer.WSConsumer then its value is used as the name of the implementation class 2. If a resource with the name of META-INF/services/org.jboss.wise.client.builder.WSDynamicClientBuilder exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. If a resource with the name of META-INF/services/org.jboss.wise.consumer.WSConsumer exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. 3. Finally, a default implementation class name is used.

Parameters:
propertyName -
defaultFactory -
Returns:
the instance

loadFromServices

public static java.lang.Object loadFromServices(java.lang.String propertyName)
Use the Services API (as detailed in the JAR specification), if available, to determine the classname.

Parameters:
propertyName -
Returns:
the instance

loadFromSystemProperty

public static java.lang.Object loadFromSystemProperty(java.lang.String propertyName)
Use the system property

Parameters:
propertyName -
Returns:
the instance

JBoss Wise API

Copyright © 2008-2009 Jboss.org. All Rights Reserved.