FileDocCategorySizeDatePackage
ORB.javaAPI DocJava SE 5 API19144Fri Aug 26 14:54:38 BST 2005com.sun.corba.se.spi.orb

ORB

public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB implements com.sun.corba.se.pept.broker.Broker, com.sun.corba.se.impl.corba.TypeCodeFactory

Fields Summary
public static boolean
ORBInitDebug
public boolean
transportDebugFlag
public boolean
subcontractDebugFlag
public boolean
poaDebugFlag
public boolean
poaConcurrencyDebugFlag
public boolean
poaFSMDebugFlag
public boolean
orbdDebugFlag
public boolean
namingDebugFlag
public boolean
serviceContextDebugFlag
public boolean
transientObjectManagerDebugFlag
public boolean
giopVersionDebugFlag
public boolean
shutdownDebugFlag
public boolean
giopDebugFlag
public boolean
invocationTimingDebugFlag
protected static com.sun.corba.se.impl.logging.ORBUtilSystemException
staticWrapper
protected com.sun.corba.se.impl.logging.ORBUtilSystemException
wrapper
protected com.sun.corba.se.impl.logging.OMGSystemException
omgWrapper
private Map
typeCodeMap
private com.sun.corba.se.impl.corba.TypeCodeImpl[]
primitiveTypeCodeConstants
com.sun.corba.se.pept.transport.ByteBufferPool
byteBufferPool
private Map
wrapperMap
private static Map
staticWrapperMap
private com.sun.corba.se.spi.monitoring.MonitoringManager
monitoringManager
protected static com.sun.corba.se.spi.presentation.rmi.PresentationManager
globalPM
Constructors Summary
protected ORB()

	// Initialize logging first, since it is needed nearly 
	// everywhere (for example, in TypeCodeImpl).
	wrapperMap = new ConcurrentHashMap();
	wrapper = ORBUtilSystemException.get( this, 
	    CORBALogDomains.RPC_PRESENTATION ) ;
	omgWrapper = OMGSystemException.get( this, 
	    CORBALogDomains.RPC_PRESENTATION ) ;

	typeCodeMap = new HashMap();

	primitiveTypeCodeConstants = new TypeCodeImpl[] {
	    new TypeCodeImpl(this, TCKind._tk_null),	
	    new TypeCodeImpl(this, TCKind._tk_void),
	    new TypeCodeImpl(this, TCKind._tk_short),		
	    new TypeCodeImpl(this, TCKind._tk_long),	
	    new TypeCodeImpl(this, TCKind._tk_ushort),	
	    new TypeCodeImpl(this, TCKind._tk_ulong),	
	    new TypeCodeImpl(this, TCKind._tk_float),	
	    new TypeCodeImpl(this, TCKind._tk_double),	
	    new TypeCodeImpl(this, TCKind._tk_boolean),	
	    new TypeCodeImpl(this, TCKind._tk_char),	
	    new TypeCodeImpl(this, TCKind._tk_octet),
	    new TypeCodeImpl(this, TCKind._tk_any),	
	    new TypeCodeImpl(this, TCKind._tk_TypeCode),	
	    new TypeCodeImpl(this, TCKind._tk_Principal),
	    new TypeCodeImpl(this, TCKind._tk_objref),	
	    null,	// tk_struct    
	    null,	// tk_union     
	    null,	// tk_enum      
	    new TypeCodeImpl(this, TCKind._tk_string),		
	    null,	// tk_sequence  
	    null,	// tk_array     
	    null,	// tk_alias     
	    null,	// tk_except    
	    new TypeCodeImpl(this, TCKind._tk_longlong),	
	    new TypeCodeImpl(this, TCKind._tk_ulonglong),
	    new TypeCodeImpl(this, TCKind._tk_longdouble),
	    new TypeCodeImpl(this, TCKind._tk_wchar),		
	    new TypeCodeImpl(this, TCKind._tk_wstring),	
	    new TypeCodeImpl(this, TCKind._tk_fixed),	
	    new TypeCodeImpl(this, TCKind._tk_value),	
	    new TypeCodeImpl(this, TCKind._tk_value_box),
	    new TypeCodeImpl(this, TCKind._tk_native),	
	    new TypeCodeImpl(this, TCKind._tk_abstract_interface)
	} ;

        monitoringManager = 
            MonitoringFactories.getMonitoringManagerFactory( ).
		createMonitoringManager(
                MonitoringConstants.DEFAULT_MONITORING_ROOT,
		MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION);
    
Methods Summary
public abstract voidcheckShutdownState()

public abstract voidfinishedDispatch()

public com.sun.corba.se.pept.transport.ByteBufferPoolgetByteBufferPool()

        if (byteBufferPool == null)
            byteBufferPool = new ByteBufferPoolImpl(this);

        return byteBufferPool;
    
private static java.util.logging.LoggergetCORBALogger(java.lang.String ORBId, java.lang.String domain)

        String fqLogDomain = CORBALogDomains.TOP_LEVEL_DOMAIN + "." +
	    ORBId + "." + domain;

        return Logger.getLogger( fqLogDomain, ORBConstants.LOG_RESOURCE_FILE );
    
public abstract com.sun.corba.se.spi.protocol.ClientDelegateFactorygetClientDelegateFactory()

public abstract com.sun.corba.se.spi.copyobject.CopierManagergetCopierManager()

public abstract com.sun.corba.se.spi.transport.CorbaContactInfoListFactorygetCorbaContactInfoListFactory()

public abstract com.sun.corba.se.spi.transport.CorbaTransportManagergetCorbaTransportManager()

public abstract com.sun.corba.se.spi.ior.IORgetFVDCodeBaseIOR()

public abstract com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManagergetLegacyServerSocketManager()

public abstract com.sun.corba.se.spi.resolver.LocalResolvergetLocalResolver()
Get the LocalResolver used in this ORB. This LocalResolver is used for register_initial_reference only.

public com.sun.corba.se.spi.logging.LogWrapperBasegetLogWrapper(java.lang.String logDomain, java.lang.String exceptionGroup, com.sun.corba.se.spi.logging.LogWrapperFactory factory)
get the log wrapper class (its type is dependent on the exceptionGroup) for the given log domain and exception group in this ORB instance.

        StringPair key = new StringPair( logDomain, exceptionGroup ) ;

        LogWrapperBase logWrapper = (LogWrapperBase)wrapperMap.get( key ); 
        if (logWrapper == null) {
            logWrapper = factory.create( getLogger( logDomain ) );
            wrapperMap.put( key, logWrapper );
        }

        return logWrapper;
    
public java.util.logging.LoggergetLogger(java.lang.String domain)
Returns the logger based on the category.

	ORBData odata = getORBData() ;

	// Determine the correct ORBId.  There are 3 cases:
	// 1. odata is null, which happens if we are getting a logger before
	//    ORB initialization is complete.  In this case we cannot determine
	//    the ORB ID (it's not known yet), so we set the ORBId to
	//    _INITIALIZING_.
	// 2. odata is not null, so initialization is complete, but ORBId is set to
	//    the default "".  To avoid a ".." in
	//    the log domain, we simply use _DEFAULT_ in this case.
	// 3. odata is not null, ORBId is not "": just use the ORBId.
	String ORBId ;
	if (odata == null)
	    ORBId = "_INITIALIZING_" ;
	else {
	    ORBId = odata.getORBId() ;
	    if (ORBId.equals(""))
		ORBId = "_DEFAULT_" ;
	}

	return getCORBALogger( ORBId, domain ) ;
    
public com.sun.corba.se.spi.monitoring.MonitoringManagergetMonitoringManager()

        return monitoringManager;
    
public abstract com.sun.corba.se.spi.orb.ORBDatagetORBData()

public abstract com.sun.corba.se.spi.orb.ORBVersiongetORBVersion()

public abstract com.sun.corba.se.spi.ior.ObjectKeyFactorygetObjectKeyFactory()

public abstract com.sun.corba.se.spi.protocol.PIHandlergetPIHandler()

public static com.sun.corba.se.spi.presentation.rmi.PresentationManagergetPresentationManager()
Get the single instance of the PresentationManager


     
	staticWrapper = ORBUtilSystemException.get( 
	    CORBALogDomains.RPC_PRESENTATION ) ;

	boolean useDynamicStub = 
	    ((Boolean)AccessController.doPrivileged(
		new PrivilegedAction() {
		    public java.lang.Object run() {
			return Boolean.valueOf( Boolean.getBoolean (
			    ORBConstants.USE_DYNAMIC_STUB_PROPERTY ) ) ;
		    }
		}
	    )).booleanValue() ;

	PresentationManager.StubFactoryFactory dynamicStubFactoryFactory = 
	    (PresentationManager.StubFactoryFactory)AccessController.doPrivileged(
		new PrivilegedAction() {
		    public java.lang.Object run() {
			PresentationManager.StubFactoryFactory sff = 
			    PresentationDefaults.getProxyStubFactoryFactory() ;

			String className = System.getProperty( 
			    ORBConstants.DYNAMIC_STUB_FACTORY_FACTORY_CLASS,
			    "com.sun.corba.se.impl.presentation.rmi.bcel.StubFactoryFactoryBCELImpl" ) ;

			try {
			    // First try the configured class name, if any
			    Class cls = ORBClassLoader.loadClass( className ) ;
			    sff = (PresentationManager.StubFactoryFactory)cls.newInstance() ;
			} catch (Exception exc) {
			    // Use the default. Log the error as a warning. 
			    staticWrapper.errorInSettingDynamicStubFactoryFactory( 
				exc, className ) ;
			}

			return sff ;
		    }
		}
	    ) ;

	globalPM = new PresentationManagerImpl( useDynamicStub ) ;
	globalPM.setStubFactoryFactory( false, 
	    PresentationDefaults.getStaticStubFactoryFactory() ) ;
	globalPM.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ; 
    
	return globalPM ;
    
public abstract com.sun.corba.se.spi.protocol.RequestDispatcherRegistrygetRequestDispatcherRegistry()

public abstract com.sun.corba.se.spi.resolver.ResolvergetResolver()
Get the resolver used in this ORB. This resolver will be used for list_initial_services and resolve_initial_references.

public abstract com.sun.corba.se.spi.servicecontext.ServiceContextRegistrygetServiceContextRegistry()

public static PresentationManager.StubFactoryFactorygetStubFactoryFactory()
Get the appropriate StubFactoryFactory. This will be dynamic or static depending on whether com.sun.CORBA.ORBUseDynamicStub is true or false.

	boolean useDynamicStubs = globalPM.useDynamicStubs() ;
	return globalPM.getStubFactoryFactory( useDynamicStubs ) ;
    
public abstract com.sun.corba.se.spi.ior.TaggedComponentFactoryFindergetTaggedComponentFactoryFinder()
Factory finders for the various parts of the IOR: tagged components, tagged profiles, and tagged profile templates.

public abstract com.sun.corba.se.spi.ior.IdentifiableFactoryFindergetTaggedProfileFactoryFinder()

public abstract com.sun.corba.se.spi.ior.IdentifiableFactoryFindergetTaggedProfileTemplateFactoryFinder()

public abstract com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManagergetThreadPoolManager()

public abstract intgetTransientServerId()
Return this ORB's transient server ID. This is needed for initializing object adapters.

public synchronized com.sun.corba.se.impl.corba.TypeCodeImplgetTypeCode(java.lang.String id)

        return (TypeCodeImpl)typeCodeMap.get(id);
    
public abstract com.sun.corba.se.spi.orb.OperationgetURLOperation()
Get the operation used in string_to_object calls. The Operation must expect a String and return an org.omg.CORBA.Object.

public com.sun.corba.se.impl.corba.TypeCodeImplget_primitive_tc(int kind)

	try {
	    return primitiveTypeCodeConstants[kind] ;
	} catch (Throwable t) {
	    throw wrapper.invalidTypecodeKind( t, new Integer(kind) ) ;
	}
    
public abstract voidhandleBadServerId(com.sun.corba.se.spi.ior.ObjectKey okey)
Handle a bad server id for the given object key. This should always through an exception: either a ForwardException to allow another server to handle the request, or else an error indication. XXX Remove after ORT for ORBD work is integrated.

public abstract voidinitBadServerIdHandler()

public abstract booleanisDuringDispatch()

public abstract booleanisLocalHost(java.lang.String hostName)

public abstract booleanisLocalServerId(int subcontractId, int serverId)

public abstract voidnotifyORB()

public abstract com.sun.corba.se.spi.oa.OAInvocationInfopeekInvocationInfo()

public abstract com.sun.corba.se.spi.oa.OAInvocationInfopopInvocationInfo()

public abstract voidpushInvocationInfo(com.sun.corba.se.spi.oa.OAInvocationInfo info)

public abstract voidsetBadServerIdHandler(com.sun.corba.se.impl.oa.poa.BadServerIdHandler handler)

public abstract voidsetClientDelegateFactory(com.sun.corba.se.spi.protocol.ClientDelegateFactory factory)

public abstract voidsetCorbaContactInfoListFactory(com.sun.corba.se.spi.transport.CorbaContactInfoListFactory factory)

public abstract voidsetINSDelegate(com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher insDelegate)
Set the ServerRequestDispatcher that should be used for handling INS requests.

public abstract voidsetLocalResolver(com.sun.corba.se.spi.resolver.LocalResolver resolver)
Set the LocalResolver used in this ORB. This LocalResolver is used for register_initial_reference only.

public abstract voidsetORBVersion(com.sun.corba.se.spi.orb.ORBVersion version)

public abstract voidsetObjectKeyFactory(com.sun.corba.se.spi.ior.ObjectKeyFactory factory)

public abstract voidsetResolver(com.sun.corba.se.spi.resolver.Resolver resolver)
Set the resolver used in this ORB. This resolver will be used for list_initial_services and resolve_initial_references.

public abstract voidsetThreadPoolManager(com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager mgr)

public synchronized voidsetTypeCode(java.lang.String id, com.sun.corba.se.impl.corba.TypeCodeImpl code)

        typeCodeMap.put(id, code);
    
public abstract voidsetURLOperation(com.sun.corba.se.spi.orb.Operation stringToObject)
Set the operation used in string_to_object calls. The Operation must expect a String and return an org.omg.CORBA.Object.

public abstract voidset_parameters(java.util.Properties props)

public abstract voidstartingDispatch()

public static com.sun.corba.se.spi.logging.LogWrapperBasestaticGetLogWrapper(java.lang.String logDomain, java.lang.String exceptionGroup, com.sun.corba.se.spi.logging.LogWrapperFactory factory)
get the log wrapper class (its type is dependent on the exceptionGroup) for the given log domain and exception group in this ORB instance.

        StringPair key = new StringPair( logDomain, exceptionGroup ) ;

        LogWrapperBase logWrapper = (LogWrapperBase)staticWrapperMap.get( key ); 
        if (logWrapper == null) {
            logWrapper = factory.create( staticGetLogger( logDomain ) );
            staticWrapperMap.put( key, logWrapper );
        }

        return logWrapper;
    
public static java.util.logging.LoggerstaticGetLogger(java.lang.String domain)

	return getCORBALogger( "_CORBA_", domain ) ;