Rio Project 4.2 API Documentation



org.rioproject.boot
Class ServiceDescriptorUtil

java.lang.Object
  extended by org.rioproject.boot.ServiceDescriptorUtil

public class ServiceDescriptorUtil
extends Object

Holds static attributes used during the startup of services and provides utilities to obtain ServiceDescriptor instances for Rio services

Author:
Dennis Reedy

Constructor Summary
ServiceDescriptorUtil()
           
 
Method Summary
static ServiceDescriptor getCybernode(String policy, int port, String... cybernodeConfig)
          Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode.
static ServiceDescriptor getCybernode(String policy, String... cybernodeConfig)
          Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode using the Webster port created by this utility.
static ServiceDescriptor getCybernode(String policy, String hostAddress, int port, String... cybernodeConfig)
          Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode.
static ServiceDescriptor getLookup(String policy, int port, String... lookupConfig)
          Get the ServiceDescriptor instance for the Jini Lookup Service, Reggie.
static ServiceDescriptor getLookup(String policy, String... lookupConfig)
          Get the ServiceDescriptor instance for the Jini Lookup Service (Reggie), using the Webster port created by this utility.
static ServiceDescriptor getLookup(String policy, String hostAddress, int port, String... lookupConfig)
          Get the ServiceDescriptor instance for the Jini Lookup Service (Reggie), using the Webster port created by this utility.
static ServiceDescriptor getMonitor(String policy, int port, String... monitorConfig)
          Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor.
static ServiceDescriptor getMonitor(String policy, String... monitorConfig)
          Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor using the Webster port created by this utility.
static ServiceDescriptor getMonitor(String policy, String hostAddress, int port, String... monitorConfig)
          Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor.
static ServiceDescriptor getWebster(String policy, String[] roots)
          Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster.
static ServiceDescriptor getWebster(String policy, String sPort, String[] roots)
          Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster.
static ServiceDescriptor getWebster(String policy, String sPort, String[] roots, boolean debug)
          Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster
static ServiceDescriptor getWebster(String policy, String sPort, String[] roots, boolean debug, String webster)
          Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster
protected static String makePath(String dir, String... jars)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDescriptorUtil

public ServiceDescriptorUtil()
Method Detail

getWebster

public static ServiceDescriptor getWebster(String policy,
                                           String[] roots)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster.

Parameters:
policy - The security policy file to use
roots - The roots webster should serve
Returns:
The ServiceDescriptor instance for webster using an anonymous port. The webster.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getWebster

public static ServiceDescriptor getWebster(String policy,
                                           String sPort,
                                           String[] roots)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster.

Parameters:
policy - The security policy file to use
sPort - The port webster should use
roots - The roots webster should serve
Returns:
The ServiceDescriptor instance for webster using a specified port. The webster.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getWebster

public static ServiceDescriptor getWebster(String policy,
                                           String sPort,
                                           String[] roots,
                                           boolean debug)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster

Parameters:
policy - The security policy file to use
sPort - The port webster should use
roots - The roots webster should serve
debug - If true, set the org.rioproject.tools.debug property
Returns:
The ServiceDescriptor instance for webster using a specified port. The webster.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port

getWebster

public static ServiceDescriptor getWebster(String policy,
                                           String sPort,
                                           String[] roots,
                                           boolean debug,
                                           String webster)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.tools.webster.Webster

Parameters:
policy - The security policy file to use
sPort - The port webster should use
roots - The roots webster should serve
debug - If true, set the org.rioproject.tools.debug property
webster - The location an name of the webster jar
Returns:
The ServiceDescriptor instance for webster using a specified port. The webster.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
IllegalArgumentException - If the RIO_HOME system property is not set

getCybernode

public static ServiceDescriptor getCybernode(String policy,
                                             String... cybernodeConfig)
                                      throws IOException
Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode using the Webster port created by this utility.

Parameters:
policy - The security policy file to use
cybernodeConfig - The configuration options the Cybernode will use
Returns:
The ServiceDescriptor instance for the Cybernode using an anonymous port. The cybernode.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getCybernode

public static ServiceDescriptor getCybernode(String policy,
                                             int port,
                                             String... cybernodeConfig)
                                      throws IOException
Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode.

Parameters:
policy - The security policy file to use
port - The port to use when constructing the codebase
cybernodeConfig - The configuration options the Cybernode will use
Returns:
The ServiceDescriptor instance for the Cybernode using an anonymous port. The cybernode.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getCybernode

public static ServiceDescriptor getCybernode(String policy,
                                             String hostAddress,
                                             int port,
                                             String... cybernodeConfig)
                                      throws IOException
Get the ServiceDescriptor instance for org.rioproject.cybernode.Cybernode.

Parameters:
policy - The security policy file to use
cybernodeConfig - The configuration file the Cybernode will use
hostAddress - The address to use when constructing the codebase
port - The port to use when constructing the codebase
Returns:
The ServiceDescriptor instance for the Cybernode using an anonymous port. The cybernode.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getMonitor

public static ServiceDescriptor getMonitor(String policy,
                                           String... monitorConfig)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor using the Webster port created by this utility.

Parameters:
policy - The security policy file to use
monitorConfig - The configuration options the Monitor will use
Returns:
The ServiceDescriptor instance for the Monitor using an anonymous port. The monitor.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getMonitor

public static ServiceDescriptor getMonitor(String policy,
                                           int port,
                                           String... monitorConfig)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor.

Parameters:
policy - The security policy file to use
port - The port to use when constructing the codebase
monitorConfig - The configuration options the Monitor will use
Returns:
The ServiceDescriptor instance for the Monitor using an anonymous port. The monitor.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getMonitor

public static ServiceDescriptor getMonitor(String policy,
                                           String hostAddress,
                                           int port,
                                           String... monitorConfig)
                                    throws IOException
Get the ServiceDescriptor instance for org.rioproject.monitor.ProvisionMonitor.

Parameters:
policy - The security policy file to use
hostAddress - The address to use when constructing the codebase
port - The port to use when constructing the codebase
monitorConfig - The configuration options the Monitor will use
Returns:
The ServiceDescriptor instance for the Monitor using an anonymous port. The monitor.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getLookup

public static ServiceDescriptor getLookup(String policy,
                                          String... lookupConfig)
                                   throws IOException
Get the ServiceDescriptor instance for the Jini Lookup Service (Reggie), using the Webster port created by this utility.

Parameters:
policy - The security policy file to use
lookupConfig - The configuration file Reggie will use
Returns:
The ServiceDescriptor instance for Reggie using an anonymous port. The reggie.jar file will be loaded from RIO_HOME/lib
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getLookup

public static ServiceDescriptor getLookup(String policy,
                                          int port,
                                          String... lookupConfig)
                                   throws IOException
Get the ServiceDescriptor instance for the Jini Lookup Service, Reggie.

Parameters:
policy - The security policy file to use
lookupConfig - The configuration options Reggie will use
port - The port to use when constructing the codebase Reggie using an anonymous port. The reggie.jar file will be loaded from RIO_HOME/lib
Returns:
The ServiceDescriptor instance for
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

getLookup

public static ServiceDescriptor getLookup(String policy,
                                          String hostAddress,
                                          int port,
                                          String... lookupConfig)
                                   throws IOException
Get the ServiceDescriptor instance for the Jini Lookup Service (Reggie), using the Webster port created by this utility.

Parameters:
policy - The security policy file to use
hostAddress - The address to use when constructing the codebase
port - The port to use when constructing the codebase Reggie using an anonymous port. The reggie.jar file will be loaded from RIO_HOME/lib
lookupConfig - The configuration options Reggie will use
Returns:
The ServiceDescriptor instance for
Throws:
IOException - If there are problems getting the anonymous port
RuntimeException - If the RIO_HOME system property is not set

makePath

protected static String makePath(String dir,
                                 String... jars)

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.