com.xenonsoft.bridgetown.examples.services.impl
Class CalcServiceImpl

java.lang.Object
  extended bycom.xenonsoft.bridgetown.examples.services.impl.CalcServiceImpl
All Implemented Interfaces:
ICalcService, IDisposable, IStartable

public class CalcServiceImpl
extends java.lang.Object
implements ICalcService, IStartable, IDisposable

A default contrived Calculation Service implementation

See HiveMind: Bootstrapping The Registry

Version:
$Id: CalcServiceImpl.java,v 1.5 2005/03/29 23:41:24 peter_pilgrim Exp $
Author:
Peter Pilgrim, Jul 26, 2004 2:48:44 PM

Constructor Summary
CalcServiceImpl()
          Default constructor
 
Method Summary
 java.math.BigDecimal add(java.math.BigDecimal a, java.math.BigDecimal b)
           
 void dispose()
          Implements dispose
 java.math.BigDecimal divide(java.math.BigDecimal a, java.math.BigDecimal b)
           
 IAdder getAdder()
          Gets the adder
 IDivider getDivider()
          Gets the divider
 IMultiplier getMultiplier()
          Gets the multiplier
 ISubtractor getSubtractor()
          Gets the subtractor
 boolean isDisposed()
          Implements / overrides isDisposed
 boolean isStarted()
          Implements / overrides isStarted
 java.math.BigDecimal multiply(java.math.BigDecimal a, java.math.BigDecimal b)
           
 void setAdder(IAdder adder)
          Sets the adder
 void setDivider(IDivider divider)
          Sets the divider
 void setMultiplier(IMultiplier multiplier)
          Sets the multiplier
 void setSubtractor(ISubtractor subtractor)
          Sets the subtractor
 void start()
          Implements start
 java.math.BigDecimal subtract(java.math.BigDecimal a, java.math.BigDecimal b)
           
 java.lang.String toString()
          Gets the debug info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalcServiceImpl

public CalcServiceImpl()
Default constructor

Method Detail

getAdder

public IAdder getAdder()
Gets the adder

Returns:
Returns the adder.

setAdder

public void setAdder(IAdder adder)
Sets the adder

Parameters:
adder - The adder to set.

getDivider

public IDivider getDivider()
Gets the divider

Returns:
Returns the divider.

setDivider

public void setDivider(IDivider divider)
Sets the divider

Parameters:
divider - The divider to set.

getMultiplier

public IMultiplier getMultiplier()
Gets the multiplier

Returns:
Returns the multiplier.

setMultiplier

public void setMultiplier(IMultiplier multiplier)
Sets the multiplier

Parameters:
multiplier - The multiplier to set.

getSubtractor

public ISubtractor getSubtractor()
Gets the subtractor

Returns:
Returns the subtractor.

setSubtractor

public void setSubtractor(ISubtractor subtractor)
Sets the subtractor

Parameters:
subtractor - The subtractor to set.

add

public java.math.BigDecimal add(java.math.BigDecimal a,
                                java.math.BigDecimal b)
Specified by:
add in interface ICalcService
See Also:
examples.services.ICalcService#add(java.math.BigDecimal, java.math.BigDecimal)

divide

public java.math.BigDecimal divide(java.math.BigDecimal a,
                                   java.math.BigDecimal b)
Specified by:
divide in interface ICalcService
See Also:
examples.services.ICalcService#divide(java.math.BigDecimal, java.math.BigDecimal)

multiply

public java.math.BigDecimal multiply(java.math.BigDecimal a,
                                     java.math.BigDecimal b)
Specified by:
multiply in interface ICalcService
See Also:
examples.services.ICalcService#multiply(java.math.BigDecimal, java.math.BigDecimal)

subtract

public java.math.BigDecimal subtract(java.math.BigDecimal a,
                                     java.math.BigDecimal b)
Specified by:
subtract in interface ICalcService
See Also:
examples.services.ICalcService#subtract(java.math.BigDecimal, java.math.BigDecimal)

start

public void start()
Implements start

Specified by:
start in interface IStartable
See Also:
IStartable.start()

dispose

public void dispose()
Implements dispose

Specified by:
dispose in interface IDisposable
See Also:
IDisposable.dispose()

isDisposed

public boolean isDisposed()
Implements / overrides isDisposed

Specified by:
isDisposed in interface ICalcService
Returns:
See Also:
examples.services.ICalcService#isDisposed()

isStarted

public boolean isStarted()
Implements / overrides isStarted

Specified by:
isStarted in interface ICalcService
Returns:
See Also:
examples.services.ICalcService#isStarted()

toString

public java.lang.String toString()
Gets the debug info



Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.