xmlBlaster 2.2.0 client API

org.xmlBlaster.util.protocol.corba
Class OrbInstanceFactory

java.lang.Object
  extended by org.xmlBlaster.util.protocol.corba.OrbInstanceFactory

public final class OrbInstanceFactory
extends java.lang.Object

OrbInstanceFactory singleton to create a CORBA orb instance. Note the IANA assigned official CORBA ports:

  corba-iiop      683/tcp    CORBA IIOP 
  corba-iiop      683/udp    CORBA IIOP 
  corba-iiop-ssl  684/tcp    CORBA IIOP SSL
  corba-iiop-ssl  684/udp    CORBA IIOP SSL
  
  corbaloc        2809/tcp   CORBA LOC
  corbaloc        2809/udp   CORBA LOC
 
We use the following CORBA specific ports:
   7608 as the default port to look for a naming service
   3412 is the xmlBlaster assigned port, used for bootstrapping (optional)
 
JacORB CORBA socket:
org.jacorb.util.Environment.getProperty("OAIAddr");
org.jacorb.util.Environment.getProperty("OAPort");


Constructor Summary
OrbInstanceFactory()
           
 
Method Summary
static MsgUnitRaw convert(Global glob, org.xmlBlaster.protocol.corba.serverIdl.MessageUnit mu)
          Converts the internal CORBA message unit to the internal representation.
static MsgUnitRaw[] convert(Global glob, org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[] msgUnitArr)
          Converts the internal CORBA message unit array to the internal representation.
static XmlBlasterException convert(Global glob, org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException eCorba)
          Converts the internal CORBA XmlBlasterException to the util.XmlBlasterException.
static org.xmlBlaster.protocol.corba.serverIdl.MessageUnit convert(MsgUnitRaw mu)
          Converts the internal MsgUnitRaw to the CORBA message unit.
static org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[] convert(MsgUnitRaw[] msgUnitArr)
          Converts the internal MsgUnitRaw array to the CORBA message unit array.
static org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException convert(XmlBlasterException eUtil)
          Converts the util.XmlBlasterException to the internal CORBA XmlBlasterException.
static org.omg.CORBA.ORB createOrbInstance(Global glob, java.lang.String[] args, java.util.Properties props, AddressBase address)
           
static java.lang.String extractHost(org.omg.CORBA.Object obj, org.omg.CORBA.ORB orb)
          Obtain the host information from the given CORBA object.
static OrbInstanceWrapper getOrbInstanceWrapper(Global glob, java.lang.String prefix)
          Get (or create) an OrbInstanceWrapper object which is useful to handle one CORBA orb instance with reference counting
static java.lang.String getString(org.omg.CosNaming.NameComponent[] nameComponent)
          Creates a string representation of a NameService name hierarchy.
static void startNameService(Global glob_)
          Note: This code is not yet tested to be functional (Marcel 2003-12-12)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrbInstanceFactory

public OrbInstanceFactory()
Method Detail

createOrbInstance

public static org.omg.CORBA.ORB createOrbInstance(Global glob,
                                                  java.lang.String[] args,
                                                  java.util.Properties props,
                                                  AddressBase address)
Parameters:
glob -
args - command line args, see org.omg.CORBA.ORB.init(), use glob.getProperty().getProperties()
props - application-specific properties; may be null, see org.omg.CORBA.ORB.init(String[], Properties)
address - The address configuration
Returns:
Access to a new created orb handle
See Also:
ORB.init(String[], Properties)

getOrbInstanceWrapper

public static OrbInstanceWrapper getOrbInstanceWrapper(Global glob,
                                                       java.lang.String prefix)
Get (or create) an OrbInstanceWrapper object which is useful to handle one CORBA orb instance with reference counting

Parameters:
glob -
prefix - A unique identifier for the orb, using the same prefix will return the same orb on second and further calls

extractHost

public static java.lang.String extractHost(org.omg.CORBA.Object obj,
                                           org.omg.CORBA.ORB orb)
Obtain the host information from the given CORBA object. This is accomplished by parsing the object's IOR using CORBA classes org.omg.IOP.IORHelper and org.omg.IIOP.ProfileBody_1_1Helper. Consequently, CORBA version is 2.x (or higher) is required.

Parameters:
obj - the CORBA object to interrogate
orb - the ORB to use during interrogation

startNameService

public static void startNameService(Global glob_)
Note: This code is not yet tested to be functional (Marcel 2003-12-12)


convert

public static final MsgUnitRaw convert(Global glob,
                                       org.xmlBlaster.protocol.corba.serverIdl.MessageUnit mu)
                                throws XmlBlasterException
Converts the internal CORBA message unit to the internal representation.

Throws:
XmlBlasterException

convert

public static final org.xmlBlaster.protocol.corba.serverIdl.MessageUnit convert(MsgUnitRaw mu)
Converts the internal MsgUnitRaw to the CORBA message unit.


convert

public static final XmlBlasterException convert(Global glob,
                                                org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException eCorba)
Converts the internal CORBA XmlBlasterException to the util.XmlBlasterException.


convert

public static final org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException convert(XmlBlasterException eUtil)
Converts the util.XmlBlasterException to the internal CORBA XmlBlasterException.


convert

public static final MsgUnitRaw[] convert(Global glob,
                                         org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[] msgUnitArr)
                                  throws XmlBlasterException
Converts the internal CORBA message unit array to the internal representation.

Throws:
XmlBlasterException

convert

public static final org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[] convert(MsgUnitRaw[] msgUnitArr)
Converts the internal MsgUnitRaw array to the CORBA message unit array.


getString

public static java.lang.String getString(org.omg.CosNaming.NameComponent[] nameComponent)
Creates a string representation of a NameService name hierarchy. This is useful for logging

Returns:
e.g. "xmlBlaster.MOM/heron.MOM"

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.