public class TestImplClient extends java.lang.Object implements TestAPI
This ia an automatically-generated proxy that has (i.e. acquires) an instance of foo.ImplServer and which implements foo.API, which forwards API calls to the server, catching RemoteExceptions and passing them to handler methods. The handler methods can be overridden both at the method level and at a global level; by default they throw vona.rmi.RuntimeRemoteExceptions, which, unlike RemoteException, are unchecked.
Copyright (C) 2005, Marsette A. Vona, III
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software, Foundation Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TestAPI.Bar, TestAPI.Baz
Modifier and Type | Field and Description |
---|---|
protected TestAPIRemote |
remoteInstance
The instance of foo.APIRemote.
|
Constructor and Description |
---|
TestImplClient(java.lang.String name)
Indirect constructor which takes an RMI URL-format name,
acquires a remote reference to it, and then calls the direct
constructor to assign it to
remoteInstance , calling
constructorRemoteException(java.lang.String, java.rmi.RemoteException) if a RemoteException occurs
in the process. |
TestImplClient(TestAPIRemote remoteInstance)
Direct constructor, which takes an instance of foo.APIRemote
and assigns it to
remoteInstance . |
Modifier and Type | Method and Description |
---|---|
protected void |
constructorRemoteException(java.lang.String name,
java.rmi.RemoteException e)
Default constructor remote exception handler calls the
generic RemoteException handler
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
(with method name "*constructor*") and if that returns null
throws a vona.rmi.RuntimeRemoteException. |
protected java.lang.Object |
handleRemoteException(java.lang.String methodName,
java.lang.Object[] arg,
java.rmi.RemoteException e)
Default generic RemoteException handler returns null
(unhandled).
|
protected java.lang.Object |
shortCircuitRemoteCall(java.lang.String methodName,
java.lang.Object[] arg)
Default generic short-circuit handler returns null (not
short-circuited).
|
double |
testEight(double arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected double |
testEightRemoteException(double arg0,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
int[] |
testFive(java.lang.Integer[] arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected int[] |
testFiveRemoteException(java.lang.Integer[] arg0,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
boolean |
testFour(java.lang.String arg0,
int arg1)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected boolean |
testFourRemoteException(java.lang.String arg0,
int arg1,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
int |
testOne()
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected int |
testOneRemoteException(java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
TestAPI.Baz |
testSeven(TestAPI.Baz arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected TestAPI.Baz |
testSevenRemoteException(TestAPI.Baz arg0,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
TestAPI.Bar |
testSix(TestAPI.Bar arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected TestAPI.Bar |
testSixRemoteException(TestAPI.Bar arg0,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
java.lang.Object |
testThree(int arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected java.lang.Object |
testThreeRemoteException(int arg0,
java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
void |
testTwo()
A Wrapper which implements foo.API and forwards the call to
remoteInstance , first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[]) (if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below). |
protected void |
testTwoRemoteException(java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic
handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException) and
if that returns null throws
vona.rmi.RuntimeRemoteException. |
protected TestAPIRemote remoteInstance
The instance of foo.APIRemote.
public TestImplClient(TestAPIRemote remoteInstance)
Direct constructor, which takes an instance of foo.APIRemote
and assigns it to remoteInstance
.
public TestImplClient(java.lang.String name) throws java.rmi.NotBoundException, java.net.MalformedURLException
Indirect constructor which takes an RMI URL-format name,
acquires a remote reference to it, and then calls the direct
constructor to assign it to remoteInstance
, calling
constructorRemoteException(java.lang.String, java.rmi.RemoteException)
if a RemoteException occurs
in the process.
java.rmi.NotBoundException
java.net.MalformedURLException
protected void constructorRemoteException(java.lang.String name, java.rmi.RemoteException e)
Default constructor remote exception handler calls the
generic RemoteException handler handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
(with method name "*constructor*") and if that returns null
throws a vona.rmi.RuntimeRemoteException.
protected java.lang.Object handleRemoteException(java.lang.String methodName, java.lang.Object[] arg, java.rmi.RemoteException e)
Default generic RemoteException handler returns null (unhandled).
protected java.lang.Object shortCircuitRemoteCall(java.lang.String methodName, java.lang.Object[] arg)
Default generic short-circuit handler returns null (not short-circuited).
public int testOne()
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected int testOneRemoteException(java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public void testTwo() throws java.lang.UnsupportedOperationException
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected void testTwoRemoteException(java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public java.lang.Object testThree(int arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected java.lang.Object testThreeRemoteException(int arg0, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public boolean testFour(java.lang.String arg0, int arg1) throws java.lang.UnsupportedOperationException
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected boolean testFourRemoteException(java.lang.String arg0, int arg1, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public int[] testFive(java.lang.Integer[] arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected int[] testFiveRemoteException(java.lang.Integer[] arg0, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public TestAPI.Bar testSix(TestAPI.Bar arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected TestAPI.Bar testSixRemoteException(TestAPI.Bar arg0, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public TestAPI.Baz testSeven(TestAPI.Baz arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected TestAPI.Baz testSevenRemoteException(TestAPI.Baz arg0, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.
public double testEight(double arg0)
A Wrapper which implements foo.API and forwards the call to
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall(java.lang.String, java.lang.Object[])
(if that returns non-null
the remote call will not be attempted), and catching any
RemoteException and passing it to the generated handler (see
below).
protected double testEightRemoteException(double arg0, java.rmi.RemoteException e)
Default implementation of the RemoteException handler for this
method, which calls the generic handleRemoteException(java.lang.String, java.lang.Object[], java.rmi.RemoteException)
and
if that returns null throws
vona.rmi.RuntimeRemoteException.