Examples of RMIFailureHandler


Examples of java.rmi.server.RMIFailureHandler

         * result of passing the specified exception to it; otherwise,
         * this method always returns true, after sleeping to throttle
         * the accept loop if necessary.
         **/
        private boolean continueAfterAcceptFailure(Throwable t) {
            RMIFailureHandler fh = RMISocketFactory.getFailureHandler();
            if (fh != null) {
                return fh.failure(t instanceof Exception ? (Exception) t :
                                  new InvocationTargetException(t));
            } else {
                throttleLoopOnException();
                return true;
            }
View Full Code Here

Examples of java.rmi.server.RMIFailureHandler

            try {
                Socket s = ss.accept();
                startConnection(s);
                failedAcceptsNum = 0;
            } catch (Exception ex) {
                RMIFailureHandler rfh = RMISocketFactory.getFailureHandler();

                if (rfh != null) {
                    if (rfh.failure(ex)) {
                        return;
                    }
                } else {
                    // We will try to immediately accept another client again,
                    // but if we have a bad client which fails our accept tries
View Full Code Here

Examples of java.rmi.server.RMIFailureHandler

            try {
                Socket s = ss.accept();
                startConnection(s);
                failedAcceptsNum = 0;
            } catch (Exception ex) {
                RMIFailureHandler rfh = RMISocketFactory.getFailureHandler();

                if (rfh != null) {
                    if (rfh.failure(ex)) {
                        return;
                    }
                } else {
                    // We will try to immediately accept another client again,
                    // but if we have a bad client which fails our accept tries
View Full Code Here

Examples of java.rmi.server.RMIFailureHandler

    private static long TIMEOUT = 5000;

    public static void main(String[] args) throws Exception {
        System.err.println("\nRegression test for bug 4924577\n");

        RMISocketFactory.setFailureHandler(new RMIFailureHandler() {
            public boolean failure(Exception e) { return false; }
        });

        tryWith(new IOException());
        tryWith(new NullPointerException());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.