Java Code Examples for com.sun.corba.se.spi.presentation.rmi.PresentationManager

The following are top voted examples for showing how to use com.sun.corba.se.spi.presentation.rmi.PresentationManager. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: ORB.java   View source code 7 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 2
Project: OpenJSharp   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 3
Project: openjdk-jdk10   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 4
Project: openjdk9   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
    if (sm != null && javaAwtAccess != null) {
        final Object appletContext = javaAwtAccess.getAppletContext();
        if (appletContext != null) {
            return pmContexts.computeIfAbsent(appletContext,
                x -> setupPresentationManager());
        }
    }

    // No security manager or AppletAppContext
    return Holder.defaultPresentationManager;
}
 
Example 5
Project: openjdk9   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 6
Project: lookaside_java-1.8.0-openjdk   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 7
Project: lookaside_java-1.8.0-openjdk   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 8
Project: jdk8u_corba   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 9
Project: jdk8u_corba   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 10
Project: infobip-open-jdk-8   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 11
Project: infobip-open-jdk-8   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 12
Project: openjdk-source-code-learn   File: ORB.java   View source code 6 votes vote down vote up
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 ;
}
 
Example 13
Project: openjdk-source-code-learn   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 14
Project: openjdk-source-code-learn   File: StubFactoryDynamicBase.java   View source code 6 votes vote down vote up
public StubFactoryDynamicBase( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    super( classData ) ;

    // this.loader must not be null, or the newProxyInstance call
    // will fail.
    if (loader == null) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null)
            cl = ClassLoader.getSystemClassLoader();
        this.loader = cl ;
    } else {
        this.loader = loader ;
    }
}
 
Example 15
Project: OLD-OpenJDK8   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 16
Project: OLD-OpenJDK8   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 17
Project: openjdk-orb   File: ORB.java   View source code 6 votes vote down vote up
/**
 * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
 * AppContext to hold it. Creates and records one if needed.
 */
public static PresentationManager getPresentationManager()
{
    SecurityManager sm = System.getSecurityManager();
    if (sm != null && AppContext.getAppContexts().size() > 0) {
        AppContext ac = AppContext.getAppContext();
        if (ac != null) {
            synchronized (pmLock) {
                PresentationManager pm =
                    (PresentationManager) ac.get(PresentationManager.class);
                if (pm == null) {
                    pm = setupPresentationManager();
                    ac.put(PresentationManager.class, pm);
                }
                return pm;
            }
        }
    }

    // No security manager or AppContext
    return Holder.defaultPresentationManager;
}
 
Example 18
Project: openjdk-orb   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 19
Project: openjdk-icedtea7   File: DynamicStubImpl.java   View source code 6 votes vote down vote up
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
Example 20
Project: openjdk-icedtea7   File: StubFactoryDynamicBase.java   View source code 6 votes vote down vote up
public StubFactoryDynamicBase( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    super( classData ) ;

    // this.loader must not be null, or the newProxyInstance call
    // will fail.
    if (loader == null) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null)
            cl = ClassLoader.getSystemClassLoader();
        this.loader = cl ;
    } else {
        this.loader = loader ;
    }
}
 
Example 21
Project: OpenJSharp   File: ORB.java   View source code 5 votes vote down vote up
/** Get the appropriate StubFactoryFactory.  This
 * will be dynamic or static depending on whether
 * com.sun.CORBA.ORBUseDynamicStub is true or false.
 */
public static PresentationManager.StubFactoryFactory
    getStubFactoryFactory()
{
    PresentationManager gPM = getPresentationManager();
    boolean useDynamicStubs = gPM.useDynamicStubs() ;
    return gPM.getStubFactoryFactory( useDynamicStubs ) ;
}
 
Example 22
Project: OpenJSharp   File: StubFactoryDynamicBase.java   View source code 5 votes vote down vote up
private StubFactoryDynamicBase(Void unused,
        PresentationManager.ClassData classData, ClassLoader loader) {
    super(classData);
    // this.loader must not be null, or the newProxyInstance call
    // will fail.
    if (loader == null) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null)
            cl = ClassLoader.getSystemClassLoader();
        this.loader = cl ;
    } else {
        this.loader = loader ;
    }
}
 
Example 23
Project: OpenJSharp   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
 
Example 24
Project: OpenJSharp   File: ReflectiveTie.java   View source code 5 votes vote down vote up
public ReflectiveTie( PresentationManager pm, ORBUtilSystemException wrapper )
{
    SecurityManager s = System.getSecurityManager();
    if (s != null) {
        s.checkPermission(new DynamicAccessPermission("access"));
    }
    this.pm = pm ;
    this.wrapper = wrapper ;
}
 
Example 25
Project: OpenJSharp   File: PresentationManagerImpl.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactoryFactory getStubFactoryFactory(
    boolean isDynamic )
{
    if (isDynamic)
        return dynamicStubFactoryFactory ;
    else
        return staticStubFactoryFactory ;
}
 
Example 26
Project: OpenJSharp   File: PresentationManagerImpl.java   View source code 5 votes vote down vote up
public void setStubFactoryFactory( boolean isDynamic,
    PresentationManager.StubFactoryFactory sff )
{
    if (isDynamic)
        dynamicStubFactoryFactory = sff ;
    else
        staticStubFactoryFactory = sff ;
}
 
Example 27
Project: OpenJSharp   File: InvocationHandlerFactoryImpl.java   View source code 5 votes vote down vote up
public InvocationHandlerFactoryImpl( PresentationManager pm,
    PresentationManager.ClassData classData )
{
    this.classData = classData ;
    this.pm = pm ;

    Class[] remoteInterfaces =
        classData.getIDLNameTranslator().getInterfaces() ;
    proxyInterfaces = new Class[ remoteInterfaces.length + 1 ] ;
    for (int ctr=0; ctr<remoteInterfaces.length; ctr++)
        proxyInterfaces[ctr] = remoteInterfaces[ctr] ;

    proxyInterfaces[remoteInterfaces.length] = DynamicStub.class ;
}
 
Example 28
Project: OpenJSharp   File: StubFactoryFactoryProxyImpl.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactory makeDynamicStubFactory(
    PresentationManager pm, final PresentationManager.ClassData classData,
    final ClassLoader classLoader )
{
    return AccessController
            .doPrivileged(new PrivilegedAction<StubFactoryProxyImpl>() {
                @Override
                public StubFactoryProxyImpl run() {
                    return new StubFactoryProxyImpl(classData, classLoader);
                }
            });
}
 
Example 29
Project: OpenJSharp   File: StubInvocationHandlerImpl.java   View source code 5 votes vote down vote up
public StubInvocationHandlerImpl( PresentationManager pm,
    PresentationManager.ClassData classData, org.omg.CORBA.Object stub )
{
    SecurityManager s = System.getSecurityManager();
    if (s != null) {
        s.checkPermission(new DynamicAccessPermission("access"));
    }
    this.classData = classData ;
    this.pm = pm ;
    this.stub = stub ;
}
 
Example 30
Project: openjdk-jdk10   File: ORB.java   View source code 5 votes vote down vote up
private static PresentationManager setupPresentationManager() {
    staticWrapper = ORBUtilSystemException.get(
        CORBALogDomains.RPC_PRESENTATION ) ;

    boolean useDynamicStub = false;

    PresentationManager.StubFactoryFactory dynamicStubFactoryFactory = null;

    PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ;
    pm.setStubFactoryFactory( false,
        PresentationDefaults.getStaticStubFactoryFactory() ) ;
    pm.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
    return pm;
}
 
Example 31
Project: openjdk-jdk10   File: ORB.java   View source code 5 votes vote down vote up
/** Get the appropriate StubFactoryFactory.  This
 * will be dynamic or static depending on whether
 * com.sun.CORBA.ORBUseDynamicStub is true or false.
 */
public static PresentationManager.StubFactoryFactory
    getStubFactoryFactory()
{
    PresentationManager gPM = getPresentationManager();
    boolean useDynamicStubs = gPM.useDynamicStubs() ;
    return gPM.getStubFactoryFactory( useDynamicStubs ) ;
}
 
Example 32
Project: openjdk-jdk10   File: StubFactoryDynamicBase.java   View source code 5 votes vote down vote up
private StubFactoryDynamicBase(Void unused,
        PresentationManager.ClassData classData, ClassLoader loader) {
    super(classData);
    // this.loader must not be null, or the newProxyInstance call
    // will fail.
    if (loader == null) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null)
            cl = ClassLoader.getSystemClassLoader();
        this.loader = cl ;
    } else {
        this.loader = loader ;
    }
}
 
Example 33
Project: openjdk-jdk10   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
 
Example 34
Project: openjdk-jdk10   File: ReflectiveTie.java   View source code 5 votes vote down vote up
public ReflectiveTie( PresentationManager pm, ORBUtilSystemException wrapper )
{
    SecurityManager s = System.getSecurityManager();
    if (s != null) {
        s.checkPermission(new DynamicAccessPermission("access"));
    }
    this.pm = pm ;
    this.wrapper = wrapper ;
}
 
Example 35
Project: openjdk-jdk10   File: PresentationManagerImpl.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactoryFactory getStubFactoryFactory(
    boolean isDynamic )
{
    if (isDynamic)
        return dynamicStubFactoryFactory ;
    else
        return staticStubFactoryFactory ;
}
 
Example 36
Project: openjdk-jdk10   File: PresentationManagerImpl.java   View source code 5 votes vote down vote up
public void setStubFactoryFactory( boolean isDynamic,
    PresentationManager.StubFactoryFactory sff )
{
    if (isDynamic)
        dynamicStubFactoryFactory = sff ;
    else
        staticStubFactoryFactory = sff ;
}
 
Example 37
Project: openjdk-jdk10   File: InvocationHandlerFactoryImpl.java   View source code 5 votes vote down vote up
public InvocationHandlerFactoryImpl( PresentationManager pm,
    PresentationManager.ClassData classData )
{
    this.classData = classData ;
    this.pm = pm ;

    Class[] remoteInterfaces =
        classData.getIDLNameTranslator().getInterfaces() ;
    proxyInterfaces = new Class[ remoteInterfaces.length + 1 ] ;
    for (int ctr=0; ctr<remoteInterfaces.length; ctr++)
        proxyInterfaces[ctr] = remoteInterfaces[ctr] ;

    proxyInterfaces[remoteInterfaces.length] = DynamicStub.class ;
}
 
Example 38
Project: openjdk-jdk10   File: StubFactoryFactoryProxyImpl.java   View source code 5 votes vote down vote up
public PresentationManager.StubFactory makeDynamicStubFactory(
    PresentationManager pm, final PresentationManager.ClassData classData,
    final ClassLoader classLoader )
{
    return AccessController
            .doPrivileged(new PrivilegedAction<StubFactoryProxyImpl>() {
                @Override
                public StubFactoryProxyImpl run() {
                    return new StubFactoryProxyImpl(classData, classLoader);
                }
            });
}
 
Example 39
Project: openjdk-jdk10   File: StubInvocationHandlerImpl.java   View source code 5 votes vote down vote up
public StubInvocationHandlerImpl( PresentationManager pm,
    PresentationManager.ClassData classData, org.omg.CORBA.Object stub )
{
    SecurityManager s = System.getSecurityManager();
    if (s != null) {
        s.checkPermission(new DynamicAccessPermission("access"));
    }
    this.classData = classData ;
    this.pm = pm ;
    this.stub = stub ;
}
 
Example 40
Project: openjdk9   File: ORB.java   View source code 5 votes vote down vote up
private static PresentationManager setupPresentationManager() {
    staticWrapper = ORBUtilSystemException.get(
        CORBALogDomains.RPC_PRESENTATION ) ;

    boolean useDynamicStub = false;

    PresentationManager.StubFactoryFactory dynamicStubFactoryFactory = null;

    PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ;
    pm.setStubFactoryFactory( false,
        PresentationDefaults.getStaticStubFactoryFactory() ) ;
    pm.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
    return pm;
}