java.rmi.server.RMIFailureHandler Java Examples

The following examples show how to use java.rmi.server.RMIFailureHandler. 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: CloseServerSocketOnTermination.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #2
Source File: CloseServerSocketOnTermination.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #3
Source File: CloseServerSocketOnTermination.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #4
Source File: CloseServerSocketOnTermination.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #5
Source File: CloseServerSocketOnTermination.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #6
Source File: CloseServerSocketOnTermination.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #7
Source File: CloseServerSocketOnTermination.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #8
Source File: CloseServerSocketOnTermination.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #9
Source File: CloseServerSocketOnTermination.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #10
Source File: CloseServerSocketOnTermination.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #11
Source File: CloseServerSocketOnTermination.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #12
Source File: CloseServerSocketOnTermination.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #13
Source File: CloseServerSocketOnTermination.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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());
    tryWith(new OutOfMemoryError());
    tryWith(new NoClassDefFoundError());
    tryWith(new InternalError());
    tryWith(new Throwable());

    System.err.println("TEST PASSED");
}
 
Example #14
Source File: TCPTransport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #15
Source File: TCPTransport.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #16
Source File: TCPTransport.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #17
Source File: TCPTransport.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #18
Source File: TCPTransport.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #19
Source File: TCPTransport.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #20
Source File: TCPTransport.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #21
Source File: TCPTransport.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #22
Source File: TCPTransport.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #23
Source File: TCPTransport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #24
Source File: TCPTransport.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #25
Source File: TCPTransport.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}
 
Example #26
Source File: TCPTransport.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the accept loop should continue after the
 * specified exception has been caught, or false if the accept
 * loop should terminate (closing the server socket).  If
 * there is an RMIFailureHandler, this method returns the
 * 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;
    }
}