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

The following examples show how to use com.sun.corba.se.spi.presentation.rmi.PresentationManager#ClassData . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DynamicStubImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 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 2
Source File: DynamicStubImpl.java    From hottub with GNU General Public License v2.0 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
Source File: DynamicStubImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 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
Source File: DynamicStubImpl.java    From jdk8u60 with GNU General Public License v2.0 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 5
Source File: StubFactoryDynamicBase.java    From jdk1.8-source-analysis with Apache License 2.0 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 6
Source File: StubFactoryFactoryDynamicBase.java    From jdk1.8-source-analysis with Apache License 2.0 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 7
Source File: InvocationHandlerFactoryImpl.java    From jdk1.8-source-analysis with Apache License 2.0 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 8
Source File: StubFactoryFactoryProxyImpl.java    From hottub with GNU General Public License v2.0 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 9
Source File: StubInvocationHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 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 10
Source File: StubFactoryDynamicBase.java    From JDKSourceCode1.8 with MIT License 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 11
Source File: StubFactoryDynamicBase.java    From openjdk-8 with GNU General Public License v2.0 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 12
Source File: StubFactoryDynamicBase.java    From openjdk-jdk8u with GNU General Public License v2.0 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 13
Source File: StubFactoryProxyImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public StubFactoryProxyImpl( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    super( classData, loader ) ;
}
 
Example 14
Source File: StubFactoryFactoryDynamicBase.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public abstract PresentationManager.StubFactory makeDynamicStubFactory(
PresentationManager pm, PresentationManager.ClassData classData,
ClassLoader classLoader ) ;
 
Example 15
Source File: StubFactoryDynamicBase.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public StubFactoryDynamicBase( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    this (checkPermission(), classData, loader);
}
 
Example 16
Source File: StubFactoryBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected StubFactoryBase( PresentationManager.ClassData classData )
{
    this.classData = classData ;
}
 
Example 17
Source File: StubFactoryDynamicBase.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public StubFactoryDynamicBase( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    this (checkPermission(), classData, loader);
}
 
Example 18
Source File: StubFactoryProxyImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public StubFactoryProxyImpl( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    super( classData, loader ) ;
}
 
Example 19
Source File: StubFactoryDynamicBase.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public StubFactoryDynamicBase( PresentationManager.ClassData classData,
    ClassLoader loader )
{
    this (checkPermission(), classData, loader);
}
 
Example 20
Source File: StubFactoryFactoryDynamicBase.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public abstract PresentationManager.StubFactory makeDynamicStubFactory(
PresentationManager pm, PresentationManager.ClassData classData,
ClassLoader classLoader ) ;