## org.openorb.util
Class ORBFactory

    java.lang.Object
      |
      +--org.openorb.util.ORBFactory

public class ORBFactory
extends java.lang.Object

This factory class can be used to create an ORB instance that is equipped with a logger.

Author:
  Michael Rumpf

Constructor Summary
`ORBFactory()`

Method Summary
`static ORB` `createORB(java.lang.String[] args, java.util.Properties props)` Create and ORB and attach a logger instance to it.
`static ORB` `createORB(java.lang.String[] args, java.util.Properties props, java.lang.String id)` Create and ORB and attach a logger instance to it.
`static ORB` `createORB(java.lang.String[] args, java.util.Properties props, java.lang.String id, java.lang.String prio)` Create and ORB and attach a logger instance to it.
`static ORB` `createORB(java.lang.String[] args, java.util.Properties props, java.lang.String id, java.lang.String prio, java.lang.String fmt)` Create and ORB and attach a logger instance to it.
`static ORB` `createORB(java.lang.String[] args, java.util.Properties props, java.lang.String id, java.lang.String prio, java.lang.String fmt, java.io.OutputStream ostream)` The logger created by this factory method can be utilized with several parameters: id or category name priority string log format string alternative logging stream If these parameters are omitted default values will be used.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ORBFactory

    public ORBFactory()

Method Detail

### createORB

    public static ORB createORB(java.lang.String[] args,
                                java.util.Properties props)

  Create and ORB and attach a logger instance to it. All parameters for the logger will be default parameters.
  Parameters:
    `args` - The command line arguments to initialize the ORB with.
    `props` - The properties to initialize the ORB with.
  Returns:
    The ORB instance.

### createORB

    public static ORB createORB(java.lang.String[] args,
                                java.util.Properties props,
                                java.lang.String id)

  Create and ORB and attach a logger instance to it. This method uses the default stream target, i.e. System.out, the the default output format, and the default priority ERROR.
  Parameters:
    `args` - The command line arguments to initialize the ORB with.
    `props` - The properties to initialize the ORB with.
    `id` - The ORB id which will be the logger's root category.
  Returns:
    The ORB instance.

### createORB

    public static ORB createORB(java.lang.String[] args,
                                java.util.Properties props,
                                java.lang.String id,
                                java.lang.String prio)

  Create and ORB and attach a logger instance to it. This method uses the default stream target, i.e. System.out and the the default output format.
  Parameters:
    `args` - The command line arguments to initialize the ORB with.
    `props` - The properties to initialize the ORB with.
    `id` - The ORB id which will be the logger's root category.
    `prio` - The logging priority.
  Returns:
    The ORB instance.

### createORB

    public static ORB createORB(java.lang.String[] args,
                                java.util.Properties props,
                                java.lang.String id,
                                java.lang.String prio,
                                java.lang.String fmt)

  Create and ORB and attach a logger instance to it. This method uses the default stream target, i.e. System.out.
  Parameters:
    `args` - The command line arguments to initialize the ORB with.
    `props` - The properties to initialize the ORB with.
    `id` - The ORB id which will be the logger's root category.
    `prio` - The logging priority.
    `fmt` - The logging format.
  Returns:
    The ORB instance.

### createORB

    public static ORB createORB(java.lang.String[] args,
                                java.util.Properties props,
                                java.lang.String id,
                                java.lang.String prio,
                                java.lang.String fmt,
                                java.io.OutputStream ostream)

  The logger created by this factory method can be utilized with several parameters:
  - id or category name
  - priority string
  - log format string
  - alternative logging stream
  If these parameters are omitted default values will be used. The id that is used as a category name can be a starting point for supporting the new ORBid that has been introduced by CORBA 2.5 and serves also to distinguish several ORB instances. The default is "orb". The priority string can be FATAL_ERROR, INFO, WARN, and DEBUG. The reason for making this a string and not an instance of the LogKit's Priority class is that with this approach the user of this method does not get into a direct dependency to the avalon-framework and logkit jars. The default priority is Priority.ERROR. If you need to integrate OpenORB into an existing logging system that already has a distinction of the logging levels you don't want to have this info twice in each output line. Therefore it is necessary to control the format from the outside. The default is "[%7.7{priority}] (%{category}): %{message}\\n%{throwable}" If the ORB logging is integrated into a logging implementation that is not supported by a wrapper to Avalon LogKit, then it is necessary to pass an instance of a output stream which can be used from the Avalon LogKit implementation to redirect its output to.
  Parameters:
    `args` - The command line arguments to initialize the ORB with.
    `props` - The properties to initialize the ORB with.
    `id` - The ORB id which will be the logger's root category.
    `prio` - The logging priority.
    `fmt` - The logging format.
    `ostream` - The stream where to direct the logger output to.
  Returns:
    The ORB instance.