📄 orb.java
字号:
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); } // Typecode support: needed in both ORBImpl and ORBSingleton public TypeCodeImpl get_primitive_tc(int kind) { try { return primitiveTypeCodeConstants[kind] ; } catch (Throwable t) { throw wrapper.invalidTypecodeKind( t, new Integer(kind) ) ; } } public synchronized void setTypeCode(String id, TypeCodeImpl code) { typeCodeMap.put(id, code); } public synchronized TypeCodeImpl getTypeCode(String id) { return (TypeCodeImpl)typeCodeMap.get(id); } public MonitoringManager getMonitoringManager( ) { return monitoringManager; } // Special non-standard set_parameters method for // creating a precisely controlled ORB instance. // An ORB created by this call is affected only by // those properties passes explicitly in props, not by // the system properties and orb.properties files as // with the standard ORB.init methods. public abstract void set_parameters( Properties props ) ; // ORB versioning public abstract ORBVersion getORBVersion() ; public abstract void setORBVersion( ORBVersion version ) ; // XXX This needs a better name public abstract IOR getFVDCodeBaseIOR() ; /** * 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 void handleBadServerId( ObjectKey okey ) ; public abstract void setBadServerIdHandler( BadServerIdHandler handler ) ; public abstract void initBadServerIdHandler() ; public abstract void notifyORB() ; public abstract PIHandler getPIHandler() ; public abstract void checkShutdownState(); // Dispatch support: in the ORB because it is needed for shutdown. // This is used by the first level server side subcontract. public abstract boolean isDuringDispatch() ; public abstract void startingDispatch(); public abstract void finishedDispatch(); /** Return this ORB's transient server ID. This is needed for * initializing object adapters. */ public abstract int getTransientServerId(); public abstract ServiceContextRegistry getServiceContextRegistry() ; public abstract RequestDispatcherRegistry getRequestDispatcherRegistry(); public abstract ORBData getORBData() ; public abstract void setClientDelegateFactory( ClientDelegateFactory factory ) ; public abstract ClientDelegateFactory getClientDelegateFactory() ; public abstract void setCorbaContactInfoListFactory( CorbaContactInfoListFactory factory ) ; public abstract CorbaContactInfoListFactory getCorbaContactInfoListFactory() ; // XXX These next 7 methods should be moved to a ResolverManager. /** Set the resolver used in this ORB. This resolver will be used for list_initial_services * and resolve_initial_references. */ public abstract void setResolver( Resolver resolver ) ; /** Get the resolver used in this ORB. This resolver will be used for list_initial_services * and resolve_initial_references. */ public abstract Resolver getResolver() ; /** Set the LocalResolver used in this ORB. This LocalResolver is used for * register_initial_reference only. */ public abstract void setLocalResolver( LocalResolver resolver ) ; /** Get the LocalResolver used in this ORB. This LocalResolver is used for * register_initial_reference only. */ public abstract LocalResolver getLocalResolver() ; /** Set the operation used in string_to_object calls. The Operation must expect a * String and return an org.omg.CORBA.Object. */ public abstract void setURLOperation( Operation stringToObject ) ; /** Get the operation used in string_to_object calls. The Operation must expect a * String and return an org.omg.CORBA.Object. */ public abstract Operation getURLOperation() ; /** Set the ServerRequestDispatcher that should be used for handling INS requests. */ public abstract void setINSDelegate( CorbaServerRequestDispatcher insDelegate ) ; // XXX The next 5 operations should be moved to an IORManager. /** Factory finders for the various parts of the IOR: tagged components, tagged * profiles, and tagged profile templates. */ public abstract TaggedComponentFactoryFinder getTaggedComponentFactoryFinder() ; public abstract IdentifiableFactoryFinder getTaggedProfileFactoryFinder() ; public abstract IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder() ; public abstract ObjectKeyFactory getObjectKeyFactory() ; public abstract void setObjectKeyFactory( ObjectKeyFactory factory ) ; // Logging SPI /** * Returns the logger based on the category. */ public Logger getLogger( String domain ) { 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 static Logger staticGetLogger( String domain ) { return getCORBALogger( "_CORBA_", domain ) ; } private static Logger getCORBALogger( String ORBId, String domain ) { String fqLogDomain = CORBALogDomains.TOP_LEVEL_DOMAIN + "." + ORBId + "." + domain; return Logger.getLogger( fqLogDomain, ORBConstants.LOG_RESOURCE_FILE ); } /** get the log wrapper class (its type is dependent on the exceptionGroup) for the * given log domain and exception group in this ORB instance. */ public LogWrapperBase getLogWrapper( String logDomain, String exceptionGroup, LogWrapperFactory factory ) { 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; } /** get the log wrapper class (its type is dependent on the exceptionGroup) for the * given log domain and exception group in this ORB instance. */ public static LogWrapperBase staticGetLogWrapper( String logDomain, String exceptionGroup, LogWrapperFactory factory ) { 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; } // get a reference to a ByteBufferPool, a pool of NIO ByteBuffers // NOTE: ByteBuffer pool must be unique per ORB, not per process. // There can be more than one ORB per process. // This method must also be inherited by both ORB and ORBSingleton. public ByteBufferPool getByteBufferPool() { if (byteBufferPool == null) byteBufferPool = new ByteBufferPoolImpl(this); return byteBufferPool; } public abstract void setThreadPoolManager(ThreadPoolManager mgr); public abstract ThreadPoolManager getThreadPoolManager(); public abstract CopierManager getCopierManager() ;}// End of file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -