KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > compliance > server > support > InvocationHandlerTest


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package test.compliance.server.support;
9
10 /**
11  * @author <a HREF="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
12  * @version $Revision: 1.3 $
13  */

14 public class InvocationHandlerTest
15    implements InvocationHandlerTestMBean
16 {
17    String attribute = "Attribute";
18
19    public boolean invokeNoArgsNoReturnInvoked = false;
20    public boolean invokeNoReturnInvoked = false;
21
22    public boolean primitive;
23    public Boolean type;
24
25    public String getAttribute()
26    {
27       return attribute;
28    }
29
30    public void setAttribute(String attribute)
31    {
32       this.attribute = attribute;
33    }
34
35    public boolean isIsPrimitive()
36    {
37       return primitive;
38    }
39
40    public void setIsPrimitive(boolean bool)
41    {
42       this.primitive = bool;
43    }
44
45    public Boolean isIsType()
46    {
47       return type;
48    }
49
50    public void setIsType(Boolean bool)
51    {
52       this.type = bool;
53    }
54
55    public void invokeNoArgsNoReturn()
56    {
57       invokeNoArgsNoReturnInvoked = true;
58    }
59
60    public String invokeNoArgs()
61    {
62       return("invokeNoArgs");
63    }
64
65    public void invokeNoReturn(String parameter)
66    {
67       invokeNoReturnInvoked = true;
68    }
69
70    public String invoke(String parameter)
71    {
72       return parameter;
73    }
74
75    public Object invokeMixedParameters(String parameter1, int parameter2, Object parameter3)
76    {
77       return parameter3;
78    }
79 }
Popular Tags