-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComptePOA.java
92 lines (76 loc) · 2.38 KB
/
ComptePOA.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* ComptePOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from banque.idl
* Friday, September 20, 2024 11:19:23 AM WET
*/
public abstract class ComptePOA extends org.omg.PortableServer.Servant
implements CompteOperations, org.omg.CORBA.portable.InvokeHandler
{
// Constructors
private static java.util.Hashtable _methods = new java.util.Hashtable ();
static
{
_methods.put ("solde", new java.lang.Integer (0));
_methods.put ("credit", new java.lang.Integer (1));
_methods.put ("debit", new java.lang.Integer (2));
}
public org.omg.CORBA.portable.OutputStream _invoke (String $method,
org.omg.CORBA.portable.InputStream in,
org.omg.CORBA.portable.ResponseHandler $rh)
{
org.omg.CORBA.portable.OutputStream out = null;
java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
if (__method == null)
throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
switch (__method.intValue ())
{
case 0: // Compte/solde
{
double $result = (double)0;
$result = this.solde ();
out = $rh.createReply();
out.write_double ($result);
break;
}
case 1: // Compte/credit
{
double amount = in.read_double ();
boolean $result = false;
$result = this.credit (amount);
out = $rh.createReply();
out.write_boolean ($result);
break;
}
case 2: // Compte/debit
{
double amount = in.read_double ();
boolean $result = false;
$result = this.debit (amount);
out = $rh.createReply();
out.write_boolean ($result);
break;
}
default:
throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
}
return out;
} // _invoke
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:Compte:1.0"};
public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
{
return (String[])__ids.clone ();
}
public Compte _this()
{
return CompteHelper.narrow(
super._this_object());
}
public Compte _this(org.omg.CORBA.ORB orb)
{
return CompteHelper.narrow(
super._this_object(orb));
}
} // class ComptePOA