Interface RequestResultHandler
- All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable
- All Known Implementing Classes:
RemoteTableDataService.TableLocationProviderImpl
,RemoteTableLocationImpl
public interface RequestResultHandler
extends com.fishlib.base.log.LogOutputAppendable
This interface defines the callback methods that users of the Table Data Protocol must implement. For further
detail see
TableDataProtocolDriverImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RequestResultHandler
A single instance for when a handler is required, but no actions need be taken -
Method Summary
Modifier and TypeMethodDescriptionboolean
Invoked when the Table data protocol connection is established, or lost.void
onComplete
(TableDataRequest request) Invoked when the request completed successfully.void
onRejection
(TableDataRequest request, String rejectionMessage, TableDataProtocol.RequestRejectionType requestRejectionType) Invoked when the specified request was rejected.void
onTableLocationKeyAdded
(TableLocationKey locationKey) Invoked in response to atable locations request
for each discoveredTableLocationKey
.void
onTableLocationKeyRemoved
(TableLocationKey locationKey) Invoked when the upstream provider has removed, or detected a removed location.void
Invoked in response to alocation refresh request
.void
onTimeout
(TableDataRequest request) Invoked when the specified request timed out before a response was received.Methods inherited from interface com.fishlib.base.log.LogOutputAppendable
append
-
Field Details
-
NULL
A single instance for when a handler is required, but no actions need be taken
-
-
Method Details
-
onTimeout
Invoked when the specified request timed out before a response was received.- Parameters:
request
- the request object.
-
onRejection
void onRejection(@NotNull TableDataRequest request, String rejectionMessage, TableDataProtocol.RequestRejectionType requestRejectionType) Invoked when the specified request was rejected. This typically happens during subscription to a location- Parameters:
request
- the request object.rejectionMessage
- a message for context about the rejectionrequestRejectionType
- what type of rejection was received
-
onComplete
Invoked when the request completed successfully.- Parameters:
request
- the request object
-
onTableLocationKeyAdded
Invoked in response to atable locations request
for each discoveredTableLocationKey
.- Parameters:
locationKey
- the discoveredTableLocationKey
-
onTableLocationKeyRemoved
Invoked when the upstream provider has removed, or detected a removed location.- Parameters:
locationKey
- theTableLocationKey
that was removed
-
onTableLocationState
Invoked in response to alocation refresh request
.- Parameters:
state
- the updatedTableLocationState
for the location requested
-
checkHasSubscribers
boolean checkHasSubscribers()Invoked when the Table data protocol connection is established, or lost. Implementations should use this as a hook to manage the state of internal subscribers.- Returns:
- true if there were any valid subscribers remaining.
-