FileDocCategorySizeDatePackage
StubProximityListener.javaAPI DocphoneME MR2 API (J2ME)2864Wed May 02 18:00:40 BST 2007com.sun.j2me.location

StubProximityListener

public class StubProximityListener extends Object implements ProximityListener
This class contains the simplified code for testing the JSR179 implementation.

Fields Summary
private Location
currLocation
Received location from listener.
private boolean
currMonitorState
Current monitor state
Constructors Summary
Methods Summary
public LocationgetCurrLocation()
Return the current location.

return
current location

    
                
       
        return currLocation;
    
public booleangetCurrMonitorState()
Return the current monitor state.

return
current monitor state

        return currMonitorState;
    
public voidmonitoringStateChanged(boolean isMonitoringActive)
monitoringStateChanged implementation.

param
isMonitoringActive a boolean indicating the new state of the proximity monitoring

        currMonitorState = isMonitoringActive;
    
public voidproximityEvent(Coordinates coordinates, Location location)
proximityEvent implementation.

param
coordinates the registered coordinates to which proximity has been detected.
param
location the current location of the terminal

	currLocation = location; // for testing
    
public voidsetCurrLocation(Location newLocation)
Sets the current location.

param
newLocation new location for setting

        currLocation = newLocation;
    
public voidsetCurrMonitorState(boolean newState)
Sets the current monitor state.

param
newState new location for setting

        currMonitorState = newState;