Java Code Examples for sun.rmi.server.Util

The following examples show how to use sun.rmi.server.Util. These examples are extracted from open source projects. 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
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 2
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 3
Source Project: dragonwell8_jdk   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 4
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 5
Source Project: TencentKona-8   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 6
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 7
Source Project: jdk8u60   Source File: DGCImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void run() {
    ClassLoader savedCcl =
        Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(
            ClassLoader.getSystemClassLoader());

        /*
         * Put remote collector object in table by hand to prevent
         * listen on port.  (UnicastServerRef.exportObject would
         * cause transport to listen.)
         */
        try {
            dgc = new DGCImpl();
            ObjID dgcID = new ObjID(ObjID.DGC_ID);
            LiveRef ref = new LiveRef(dgcID, 0);
            UnicastServerRef disp = new UnicastServerRef(ref);
            Remote stub =
                Util.createProxy(DGCImpl.class,
                                 new UnicastRef(ref), true);
            disp.setSkeleton(dgc);
            Target target =
                new Target(dgc, disp, stub, dgcID, true);
            ObjectTable.putTarget(target);
        } catch (RemoteException e) {
            throw new Error(
                "exception initializing server-side DGC", e);
        }
    } finally {
        Thread.currentThread().setContextClassLoader(savedCcl);
    }
    return null;
}
 
Example 8
Source Project: jdk8u60   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 9
Source Project: JDKSourceCode1.8   Source File: RemoteObjectInvocationHandler.java    License: MIT License 5 votes vote down vote up
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 10
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 11
Source Project: openjdk-jdk8u   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 12
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 13
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 14
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 15
Source Project: openjdk-jdk9   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 16
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 17
Source Project: jdk8u-jdk   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 18
Source Project: Java8CN   Source File: RemoteObjectInvocationHandler.java    License: Apache License 2.0 5 votes vote down vote up
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 19
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 20
Source Project: hottub   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 21
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 22
Source Project: openjdk-8-source   Source File: DGCImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void run() {
    ClassLoader savedCcl =
        Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(
            ClassLoader.getSystemClassLoader());

        /*
         * Put remote collector object in table by hand to prevent
         * listen on port.  (UnicastServerRef.exportObject would
         * cause transport to listen.)
         */
        try {
            dgc = new DGCImpl();
            ObjID dgcID = new ObjID(ObjID.DGC_ID);
            LiveRef ref = new LiveRef(dgcID, 0);
            UnicastServerRef disp = new UnicastServerRef(ref);
            Remote stub =
                Util.createProxy(DGCImpl.class,
                                 new UnicastRef(ref), true);
            disp.setSkeleton(dgc);
            Target target =
                new Target(dgc, disp, stub, dgcID, true);
            ObjectTable.putTarget(target);
        } catch (RemoteException e) {
            throw new Error(
                "exception initializing server-side DGC", e);
        }
    } finally {
        Thread.currentThread().setContextClassLoader(savedCcl);
    }
    return null;
}
 
Example 23
Source Project: openjdk-8-source   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 24
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 25
Source Project: openjdk-8   Source File: DGCImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void run() {
    ClassLoader savedCcl =
        Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(
            ClassLoader.getSystemClassLoader());

        /*
         * Put remote collector object in table by hand to prevent
         * listen on port.  (UnicastServerRef.exportObject would
         * cause transport to listen.)
         */
        try {
            dgc = new DGCImpl();
            ObjID dgcID = new ObjID(ObjID.DGC_ID);
            LiveRef ref = new LiveRef(dgcID, 0);
            UnicastServerRef disp = new UnicastServerRef(ref);
            Remote stub =
                Util.createProxy(DGCImpl.class,
                                 new UnicastRef(ref), true);
            disp.setSkeleton(dgc);
            Target target =
                new Target(dgc, disp, stub, dgcID, true);
            ObjectTable.putTarget(target);
        } catch (RemoteException e) {
            throw new Error(
                "exception initializing server-side DGC", e);
        }
    } finally {
        Thread.currentThread().setContextClassLoader(savedCcl);
    }
    return null;
}
 
Example 26
Source Project: openjdk-8   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 27
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 28
Source Project: jdk8u_jdk   Source File: DGCClient.java    License: GNU General Public License v2.0 5 votes vote down vote up
private EndpointEntry(final Endpoint endpoint) {
    this.endpoint = endpoint;
    try {
        LiveRef dgcRef = new LiveRef(dgcID, endpoint, false);
        dgc = (DGC) Util.createProxy(DGCImpl.class,
                                     new UnicastRef(dgcRef), true);
    } catch (RemoteException e) {
        throw new Error("internal error creating DGC stub");
    }
    renewCleanThread =  AccessController.doPrivileged(
        new NewThreadAction(new RenewCleanThread(),
                            "RenewClean-" + endpoint, true));
    renewCleanThread.start();
}
 
Example 29
protected Map<Method,Long> computeValue(Class<?> remoteClass) {
    return new WeakHashMap<Method,Long>() {
        public synchronized Long get(Object key) {
            Long hash = super.get(key);
            if (hash == null) {
                Method method = (Method) key;
                hash = Util.computeMethodHash(method);
                put(method, hash);
            }
            return hash;
        }
    };
}
 
Example 30
Source Project: jdk8u-jdk   Source File: DGCImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void run() {
    ClassLoader savedCcl =
        Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(
            ClassLoader.getSystemClassLoader());

        /*
         * Put remote collector object in table by hand to prevent
         * listen on port.  (UnicastServerRef.exportObject would
         * cause transport to listen.)
         */
        try {
            dgc = new DGCImpl();
            ObjID dgcID = new ObjID(ObjID.DGC_ID);
            LiveRef ref = new LiveRef(dgcID, 0);
            UnicastServerRef disp = new UnicastServerRef(ref);
            Remote stub =
                Util.createProxy(DGCImpl.class,
                                 new UnicastRef(ref), true);
            disp.setSkeleton(dgc);
            Target target =
                new Target(dgc, disp, stub, dgcID, true);
            ObjectTable.putTarget(target);
        } catch (RemoteException e) {
            throw new Error(
                "exception initializing server-side DGC", e);
        }
    } finally {
        Thread.currentThread().setContextClassLoader(savedCcl);
    }
    return null;
}