com.ibm.websphere.samples.activitysessionEJB
Interface MasterMindGame

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface MasterMindGame
extends javax.ejb.EJBObject

The Remote Interface for the ActivitySessions Sample - MasterMind


Method Summary
 boolean calculate(int[] guess)
          This remote method is used to calculate the results of the latest guess.
 int[][] getGuessArray()
          This remote method is used to return the array of guesses made so far.
 int getGuessNumber()
          This remote method is used to return the number of guesses made so far.
 int[][] getResultsArray()
          This remote method is used to return the array of Results.
 int[] getTarget()
          This remote method is used to return the target array.
 void newGame()
          This remote method is used to inform the bean that a new game has been requested.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

calculate

boolean calculate(int[] guess)
                  throws java.rmi.RemoteException
This remote method is used to calculate the results of the latest guess.

Parameters:
guess - int [] Represents the most recent guess
Returns:
boolean Indicates if the guess is correct
Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.

getGuessArray

int[][] getGuessArray()
                      throws java.rmi.RemoteException
This remote method is used to return the array of guesses made so far.

Returns:
int [][] Representing an array of all the guesses made this game.
Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.

getGuessNumber

int getGuessNumber()
                   throws java.rmi.RemoteException
This remote method is used to return the number of guesses made so far.

Returns:
int
Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.

getResultsArray

int[][] getResultsArray()
                        throws java.rmi.RemoteException
This remote method is used to return the array of Results. There is one results for each guess.

Returns:
int [][]
Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.

getTarget

int[] getTarget()
                throws java.rmi.RemoteException
This remote method is used to return the target array.

Returns:
int []
Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.

newGame

void newGame()
             throws java.rmi.RemoteException
This remote method is used to inform the bean that a new game has been requested.

Throws:
java.rmi.RemoteException - Signals that a RemoteException has occured.