本文整理汇总了Java中com.sun.corba.se.spi.orbutil.closure.ClosureFactory类的典型用法代码示例。如果您正苦于以下问题:Java ClosureFactory类的具体用法?Java ClosureFactory怎么用?Java ClosureFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClosureFactory类属于com.sun.corba.se.spi.orbutil.closure包,在下文中一共展示了ClosureFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
public void init( ORB orb )
{
this.orb = orb ;
wrapper = POASystemException.get( orb,
CORBALogDomains.OA_LIFECYCLE ) ;
omgWrapper = OMGSystemException.get( orb,
CORBALogDomains.OA_LIFECYCLE ) ;
delegateImpl = new DelegateImpl( orb, this ) ;
registerRootPOA() ;
POACurrent poaCurrent = new POACurrent(orb);
orb.getLocalResolver().register( ORBConstants.POA_CURRENT_NAME,
ClosureFactory.makeConstant( poaCurrent ) ) ;
}
示例2: registerRootPOA
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
public void registerRootPOA()
{
// We delay the evaluation of makeRootPOA until
// a call to resolve_initial_references( "RootPOA" ).
// The Future guarantees that makeRootPOA is only called once.
Closure rpClosure = new Closure() {
public Object evaluate() {
return POAImpl.makeRootPOA( orb ) ;
}
} ;
orb.getLocalResolver().register( ORBConstants.ROOT_POA_NAME,
ClosureFactory.makeFuture( rpClosure ) ) ;
}
示例3: PIHandlerImpl
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
public PIHandlerImpl( ORB orb, String[] args ) {
this.orb = orb ;
wrapper = InterceptorsSystemException.get( orb,
CORBALogDomains.RPC_PROTOCOL ) ;
orbutilWrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_PROTOCOL ) ;
omgWrapper = OMGSystemException.get( orb,
CORBALogDomains.RPC_PROTOCOL ) ;
arguments = args ;
// Create codec factory:
codecFactory = new CodecFactoryImpl( orb );
// Create new interceptor list:
interceptorList = new InterceptorList( wrapper );
// Create a new PICurrent.
current = new PICurrent( orb );
// Create new interceptor invoker, initially disabled:
interceptorInvoker = new InterceptorInvoker( orb, interceptorList,
current );
// Register the PI current and Codec factory objects
orb.getLocalResolver().register( ORBConstants.PI_CURRENT_NAME,
ClosureFactory.makeConstant( current ) ) ;
orb.getLocalResolver().register( ORBConstants.CODEC_FACTORY_NAME,
ClosureFactory.makeConstant( codecFactory ) ) ;
}
示例4: registerInitialReferences
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
private void registerInitialReferences( final ORB orb )
{
// Register the Dynamic Any factory
Closure closure = new Closure() {
public java.lang.Object evaluate() {
return new DynAnyFactoryImpl( orb ) ;
}
} ;
Closure future = ClosureFactory.makeFuture( closure ) ;
orb.getLocalResolver().register( ORBConstants.DYN_ANY_FACTORY_NAME,
future ) ;
}
示例5: register_initial_reference
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
示例6: register_initial_reference
import com.sun.corba.se.spi.orbutil.closure.ClosureFactory; //导入依赖的package包/类
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}