01: package com.xoetrope.service.test;
02:
03: import net.xoetrope.optional.service.ServiceProxyException;
04: import com.xoetrope.service.XLocalServiceProxy;
05: import net.xoetrope.optional.service.ServiceContext;
06:
07: /**
08: * <p>Copyright (c) Xoetrope Ltd. 2001-2004</p>
09: * $Revision: 1.2 $
10: */
11: public class CalcTestService //extends XLocalServiceProxy
12: {
13: public static final String GET_NAME_64 = "2.64";
14: public static final String CALC_AREA = "101.0";
15: public static final String CALC_AREA_64 = "101.64";
16: //
17: // public CalcTestService()
18: // {
19: // status = OK;
20: // }
21: //
22: // public Object call()
23: // {
24: // return new Integer( 2 );
25: // }
26: //
27: // public Object call( String method, ServiceContext context ) throws ServiceProxyException
28: // {
29: // status = STARTED;
30: // if ( method.compareTo( "getName" ) == 0 )
31: // return this.getClass().getName();
32: // else if ( method.compareTo( "getName64" ) == 0 )
33: // return new Double( GET_NAME_64 );
34: // else if ( method.compareTo( "getNumber" ) == 0 )
35: // return call();
36: // else if ( method.compareTo( "calcArea" ) == 0 )
37: // return new Double( CALC_AREA );
38: // else if ( method.compareTo( "calcArea64" ) == 0 )
39: // return new Double( CALC_AREA_64 );
40: // else if ( method.compareTo( "getNameNoCache" ) == 0 )
41: // return new Double( CALC_AREA_64 );
42: //
43: // status = COMPLETE;
44: // return null;
45: // }
46: }
|