public interface ResourcePositionNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to resource positions in this Map.
This session is intended
for consumers needing to synchronize their state with this service without
the use of polling. Notifications are cancelled when this session is
closed.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForResourcePathNotifications()
Tests if this user can register for notifications.
|
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
void |
registerForEnteredSpatialUnit(SpatialUnit spatialUnit)
Register for notifications of an entered spatial unit.
|
void |
registerForEnteredSpatialUnitForResource(Id resourceId,
SpatialUnit spatialUnit)
Register for notifications of an entered spatial unit.
|
void |
registerForEnteredSpatialUnitForResourceByGenusType(Id resourceGenusType,
SpatialUnit spatialUnit)
Register for notifications of an entered spatial unit for resources of
the given resource genus type.
|
void |
registerForExitedSpatialUnit(SpatialUnit spatialUnit)
Register for notifications of an exited spatial unit.
|
void |
registerForExitedSpatialUnitForResource(Id resourceId,
SpatialUnit spatialUnit)
Register for notifications of an exited spatial unit.
|
void |
registerForExitedSpatialUnitForResourcesByGenusType(Type resourceGenusType,
SpatialUnit spatialUnit)
Register for notifications of an exited spatial unit for the given
resource genus type.
|
void |
registerForMovedResource(Id resourceId)
Registers for notification of moved resources.
|
void |
registerForMovedResources()
Registers for notification of moved resources.
|
void |
registerForMovedResourcesByGenusType(Type resourceGenusType)
Registers for notification of moved resources for the given resource
genus type.
|
void |
useFederatedMapView()
Federates the view for methods in this session.
|
void |
useIsolatedMapView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getMapId()
Map
Id
associated with this
session. Map Id
associated with this sessionmandatory
- This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForResourcePathNotifications()
PERMISSION_DENIED.
This is intended as a hint to an
application that may wish not to offer notification operations to
unauthorized users. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedMapView()
mandatory
- This method is must be implemented. void useIsolatedMapView()
mandatory
- This method is must be implemented. void registerForMovedResources() throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.movedResource()
is invoked when a
resource changes coordinates.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForMovedResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.movedResource()
is invoked when the
specified resource changes coordinates.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForMovedResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.movedResource()
is
invoked when a resource changes coordinates.resourceGenusType
- the genus type of the Resource
to monitorNullArgumentException
- resourceGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForEnteredSpatialUnit(SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.enteredSpatialUnit()
is invoked when
a resource appears in the specified spatial unit.spatialUnit
- the SpatialUnit
to monitorNullArgumentException
- spatialUnit
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. void registerForEnteredSpatialUnitForResource(Id resourceId, SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.enteredSpatialUnit()
is invoked when
the specified resource appears in the specified spatial unit.resourceId
- the Id
of the Resource
to monitorspatialUnit
- the SpatialUnit
to monitorNullArgumentException
- resourceId
or
spatialUnit
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. void registerForEnteredSpatialUnitForResourceByGenusType(Id resourceGenusType, SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.enteredSpatialUnit()
is invoked when
the specified resource appears in the specified spatial unit.resourceGenusType
- the genus type of the Resource
to monitorspatialUnit
- the SpatialUnit
to monitorNullArgumentException
- resourceGenusType
or spatialUnit
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. void registerForExitedSpatialUnit(SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.exitedSpatialUnit()
is invoked when a
resource exits the specified spatial unit.spatialUnit
- the SpatialUnit
to monitorNullArgumentException
- spatialUnit
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. void registerForExitedSpatialUnitForResource(Id resourceId, SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.exitedSpatialUnit()
is invoked when
the specified resource exits the specified spatial unit.resourceId
- the Id
of the Resource
to monitorspatialUnit
- the SpatialUnit
to monitorNullArgumentException
- resourceId
or
spatialUnit
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. void registerForExitedSpatialUnitForResourcesByGenusType(Type resourceGenusType, SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
ResourcePositionReceiver.exitedSpatialUnit()
is invoked when a
resource exits the specified spatial unit.resourceGenusType
- the genus type of the Resource
to monitorspatialUnit
- the SpatialUnit
to monitorNullArgumentException
- resourceGenusTYpe
or spatialUnit
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented.