Annotation Interface RemoteFailure


@Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface RemoteFailure
Annotate a remote method or interface to specify what exception is to be used for indicating a remote call failure. By default, that exception is RemoteException, and it (or a superclass) must be declared to be thrown.
@RemoteFailure(declared=false)
void applyOptions(String opts);
@RemoteFailure(exception=SQLException.class)
int executeUpdate(String sql) throws SQLException;
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    By default, if the exception is checked, it must be declared to be thrown.
    Class<? extends Throwable>
    Specify the exception to throw when the remote call fails.
  • Element Details

    • exception

      Class<? extends Throwable> exception
      Specify the exception to throw when the remote call fails.
      Default:
      org.cojen.dirmi.RemoteException.class
    • declared

      boolean declared
      By default, if the exception is checked, it must be declared to be thrown. Set to false to allow the exception to be thrown without being declared.
      Default:
      true