Package xal.service.worker
Class WorkService
java.lang.Object
xal.service.worker.WorkService
- All Implemented Interfaces:
Working
Demo service providing demo work.
- Author:
- tap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
add
(double summand, double addend) add two numbersdouble[]
generateSinusoid
(double amplitude, double frequency, double phase, int numPoints) calculate the sinusoid waveform from zero to 2piget the launch timesayHelloTo
(String name) say hello to the person with the specified namevoid
shutdown
(int code) shutdown the serviceint
sumIntegers
(int[] summands) add the integers and return the resulting sum
-
Constructor Details
-
WorkService
public WorkService()
-
-
Method Details
-
add
public double add(double summand, double addend) add two numbers -
sumIntegers
public int sumIntegers(int[] summands) add the integers and return the resulting sum- Specified by:
sumIntegers
in interfaceWorking
-
getLaunchTime
get the launch time- Specified by:
getLaunchTime
in interfaceWorking
-
generateSinusoid
public double[] generateSinusoid(double amplitude, double frequency, double phase, int numPoints) calculate the sinusoid waveform from zero to 2pi- Specified by:
generateSinusoid
in interfaceWorking
-
sayHelloTo
say hello to the person with the specified name- Specified by:
sayHelloTo
in interfaceWorking
-
shutdown
public void shutdown(int code) shutdown the service
-