gov.sns.tools.services.samples
Class GreetingService

java.lang.Object
  |
  +--gov.sns.tools.services.samples.GreetingService
All Implemented Interfaces:
Greeting

public class GreetingService
extends java.lang.Object
implements Greeting

GreetingService is a sample service provider implementing the Greeting service.


Field Summary
protected  java.lang.String _identity
           
 
Constructor Summary
GreetingService(java.lang.String identity)
          GreetingService constructor registers the greeting service.
 
Method Summary
 double add(double x, double y)
          Add two numbers and return the result.
static void main(java.lang.String[] args)
          Launch the Greeting service.
 java.lang.String sayHelloTo(java.lang.String receiver)
          Generate a greeting incorporating the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_identity

protected final java.lang.String _identity
Constructor Detail

GreetingService

public GreetingService(java.lang.String identity)
GreetingService constructor registers the greeting service.

Parameters:
identity - The identity of the this greeting service provider.
Method Detail

sayHelloTo

public java.lang.String sayHelloTo(java.lang.String receiver)
Generate a greeting incorporating the receiver.

Specified by:
sayHelloTo in interface Greeting
Parameters:
receiver - The receiver to address in the greeting.
Returns:
A greeting.

add

public double add(double x,
                  double y)
Add two numbers and return the result.

Specified by:
add in interface Greeting
Parameters:
x - An addend
y - An augend
Returns:
The sum of x and y.

main

public static void main(java.lang.String[] args)
Launch the Greeting service.

Parameters:
args - The identities of each service to provide.