com.ibm.websphere.samples.technologysamples.basiccalcclient.common
Class BasicCalculatorClient

java.lang.Object
  extended by com.ibm.websphere.samples.technologysamples.basiccalcclient.common.BasicCalculatorClient
Direct Known Subclasses:
BasicCalculatorClientJ2EE

public abstract class BasicCalculatorClient
extends java.lang.Object


Nested Class Summary
 class BasicCalculatorClient.CalcException_DivideByZero
           
 class BasicCalculatorClient.CalcException_InvalidOperation
           
 class BasicCalculatorClient.CalcException_NotInitialized
           
 
Field Summary
 BasicCalculator bc
           
 BasicCalculatorHome bcHome
           
 
Constructor Summary
BasicCalculatorClient()
           
 
Method Summary
 BasicCalculatorClientResultBean calculate(java.lang.String operation, double operand1, double operand2)
          Main service method for BasicCalculatorClient.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bc

public BasicCalculator bc

bcHome

public BasicCalculatorHome bcHome
Constructor Detail

BasicCalculatorClient

public BasicCalculatorClient()
Method Detail

calculate

public BasicCalculatorClientResultBean calculate(java.lang.String operation,
                                                 double operand1,
                                                 double operand2)
                                          throws javax.naming.NamingException,
                                                 java.rmi.RemoteException,
                                                 BasicCalculatorClient.CalcException_DivideByZero,
                                                 BasicCalculatorClient.CalcException_InvalidOperation,
                                                 BasicCalculatorClient.CalcException_NotInitialized,
                                                 javax.ejb.CreateException
Main service method for BasicCalculatorClient. Encapsulates all EJB access.

Parameters:
operation - Operation to perform: add, subtract, multiply, divide
operand1 - First operand of the operation.
operand2 - Second operand of the operation.
Returns:
CalcResult object
Throws:
javax.naming.NamingException
java.rmi.RemoteException
BasicCalculatorClient.CalcException_DivideByZero
BasicCalculatorClient.CalcException_InvalidOperation
BasicCalculatorClient.CalcException_NotInitialized
javax.ejb.CreateException