printermanagementimplproxy.java

来自「java2高级教程大学教程的配套光盘源码」· Java 代码 · 共 399 行 · 第 1/2 页

JAVA
399
字号
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls isPaperJam() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#isPaperJam
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#isPaperJam 
     * @throws java.rmi.RemoteException
     */
    public boolean isPaperJam( )
        throws RemoteException
    {
        try
        {
            // make remote call
            return ((Boolean) remoteInstanceMethodCall(
                "isPaperJam()Z",
                new Object[] {  }
            ) ).booleanValue();
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls getPaperInTray() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#getPaperInTray
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#getPaperInTray 
     * @throws java.rmi.RemoteException
     */
    public int getPaperInTray( )
        throws RemoteException
    {
        try
        {
            // make remote call
            return ((Integer) remoteInstanceMethodCall(
                "getPaperInTray()I",
                new Object[] {  }
            ) ).intValue();
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls getPendingPrintJobs() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#getPendingPrintJobs
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#getPendingPrintJobs 
     * @throws java.rmi.RemoteException
     */
    public String[] getPendingPrintJobs( )
        throws RemoteException
    {
        try
        {
            // make remote call
            return (String[])remoteInstanceMethodCall(
                "getPendingPrintJobs()[Ljava.lang.String;",
                new Object[] {  }
            );
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls isOnline() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#isOnline
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#isOnline 
     * @throws java.rmi.RemoteException
     */
    public boolean isOnline( )
        throws RemoteException
    {
        try
        {
            // make remote call
            return ((Boolean) remoteInstanceMethodCall(
                "isOnline()Z",
                new Object[] {  }
            ) ).booleanValue();
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls cancelPendingPrintJobs() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#cancelPendingPrintJobs
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#cancelPendingPrintJobs 
     * @throws java.rmi.RemoteException
     */
    public void cancelPendingPrintJobs( )
        throws RemoteException
    {
        try
        {
            // make remote call
            remoteInstanceMethodCall(
                "cancelPendingPrintJobs()V",
                new Object[] {  }
            );
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * Calls addToner() on PrinterManagementImpl object pointed to by this Proxy.
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#addToner
     * @see com.deitel.advjhtp1.jiro.DynamicService.service.PrinterManagementImpl#addToner 
     * @throws java.rmi.RemoteException
     */
    public void addToner( )
        throws RemoteException
    {
        try
        {
            // make remote call
            remoteInstanceMethodCall(
                "addToner()V",
                new Object[] {  }
            );
        }
        catch ( InvocationTargetException ite )
        {
            Throwable t = ite.getTargetException();
            // rethrow Errors as ServerError
            if ( t instanceof Error )
                throw new ServerError( "Error thrown from referent method", (Error) t );
            // rethrow other exceptions as UnexpectedException
            throw new UnexpectedException(
                "Proxy does not match referent class.  Unexpected declared exception thrown from referent method", (Exception) t );
        }
    }
    /**
     * @internal
     * Code generation version
     */
    public static final String _codeGenerationVersion = "Sun Aug 06 09:21:42 EDT 2000";
    
} // end of PrinterManagementImplProxy

/***************************************************************
 * (C) Copyright 2002 by Deitel & Associates, Inc. and         *
 * Prentice Hall. All Rights Reserved.                         *
 *                                                             *
 * DISCLAIMER: The authors and publisher of this book have     *
 * used their best efforts in preparing the book. These        *
 * efforts include the development, research, and testing of   *
 * the theories and programs to determine their effectiveness. *
 * The authors and publisher make no warranty of any kind,     *
 * expressed or implied, with regard to these programs or to   *
 * the documentation contained in these books. The authors     *
 * and publisher shall not be liable in any event for          *
 * incidental or consequential damages in connection with, or  *
 * arising out of, the furnishing, performance, or use of      *
 * these programs.                                             *
 ***************************************************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?