Class WorkConnectionRoutes
java.lang.Object
io.aether.cloud.client.WorkConnectionRoutes
- All Implemented Interfaces:
WorkConnectionRouter
Immutable SID-based work routing table.
Maps an original work server SID to a customer-hosted proxy physical URI. The logical server descriptor used for crypto and identity is untouched.
Two explicit policies exist:
proxyOnly(Map)- every SID in the client cloud must have a route; unknown SIDs are rejected instead of silently falling back to direct connections;withDirectFallback(Map)- unknown SIDs connect directly to their descriptor URI as in the non-proxied client.
-
Field Summary
Fields inherited from interface WorkConnectionRouter
DIRECT -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic WorkConnectionRoutesProxy-only mode.resolve(io.aether.api.common.ServerDescriptor server) Resolve the physical transport URI for the given logical server.routes()static WorkConnectionRouteswithDirectFallback(Map<Short, URI> routes) Mixed mode.
-
Method Details
-
proxyOnly
Proxy-only mode. Any SID not present in the map fails with ainstead of silently using a direct route.invalid reference
ClientApiException -
withDirectFallback
Mixed mode. Unknown SIDs fall back to the original descriptor URI. -
resolve
Description copied from interface:WorkConnectionRouterResolve the physical transport URI for the given logical server.- Specified by:
resolvein interfaceWorkConnectionRouter- Parameters:
server- logical server descriptor; nevernull- Returns:
- physical URI to connect to, or
nullto fall back to the descriptor-provided URI
-
routes
-
isProxyOnly
public boolean isProxyOnly()
-