Interface MyLocationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MyLocationSession extends OsidSession

This session defines methods to route between locations.

  • Method Details

    • getMapId

      Id getMapId()
      Gets the Map Id associated with this session.
      Returns:
      the Map Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getMap

      Gets the Map associated with this session.
      Returns:
      the map
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAccessMyLocation

      boolean canAccessMyLocation()
      Tests if this user can query own location. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not offer location operations to unauthorized users.
      Returns:
      false if location methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • atDesignatedLocation

      boolean atDesignatedLocation()
      Tests if this agent is at a designated location.
      Returns:
      true if the agent is at a designated location, false otherrwise
      Compliance:
      mandatory - This method must be implemented.
    • getMyLocation

      Gets the current location of this agent.
      Returns:
      the current location
      Throws:
      IllegalStateException - atDesignatedLocation() is false
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getMyCoordinate

      Gets the current coordinate of this agent.
      Returns:
      the current coordinate
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getNearestLocationsToMe

      Gets the current nearest locations to this agent ordered by distance.
      Returns:
      the nearest locations
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getNearestLocationToMeByGenusType

      LocationList getNearestLocationToMeByGenusType(Type locationGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the current nearest location of this agent of the specified location genus type ordered by distance.
      Parameters:
      locationGenusType - a location genus type
      Returns:
      the nearest locations
      Throws:
      NullArgumentException - locationGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.