Class ControllerSession
java.lang.Object
be.theking90000.mumble.controller.spaces.ControllerSession
Typed Spaces facade over the profile-neutral
CoreSession.
This class owns only Spaces payload encoding, explicit observations, and the decoded space cache. The delegated Core session owns transport lifecycle, leases, reconciliation, reliable requests, participant ownership, revisions, and reconnection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for one typed Spaces session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionListener(ControllerSessionListener listener) Adds a listener for subsequent session transitions.voidaddSpaceListener(SpaceListener listener) Adds a listener for subsequent full space replacements and closures.static ControllerSession.BuilderCreates a Spaces session builder.be.theking90000.mumble.controller.core.ControllerIdfetchSpace(SpaceKey spaceKey) Fetches one full snapshot without changing the observation set.observeSpace(SpaceKey spaceKey) Adds a space to the complete explicit observation set.participant(be.theking90000.mumble.controller.core.ParticipantId participantId) Looks up a current desired participant.Map<be.theking90000.mumble.controller.core.ParticipantId,ParticipantHandle> registerParticipant(be.theking90000.mumble.controller.core.ParticipantId participantId, ParticipantSpec spec) Registers a participant with a complete Spaces specification.voidRemoves a session listener; a missing listener is ignored.voidremoveSpaceListener(SpaceListener listener) Removes a space listener; a missing listener is ignored.spaces()start()be.theking90000.mumble.controller.core.ControllerSessionStatestate()stop()unobserveSpace(SpaceKey spaceKey) Removes a space from the explicit observation set.
-
Method Details
-
builder
public static ControllerSession.Builder builder(be.theking90000.mumble.controller.core.ControllerId controllerId, URI endpoint) Creates a Spaces session builder.- Parameters:
controllerId- stable declarative controller identityendpoint- Controller service URI- Returns:
- new builder
-
controllerId
public be.theking90000.mumble.controller.core.ControllerId controllerId()- Returns:
- declarative controller identity
-
state
public be.theking90000.mumble.controller.core.ControllerSessionState state()- Returns:
- current session lifecycle state
-
start
- Returns:
- future completed after opening reconciliation
-
registerParticipant
public ParticipantHandle registerParticipant(be.theking90000.mumble.controller.core.ParticipantId participantId, ParticipantSpec spec) Registers a participant with a complete Spaces specification.- Parameters:
participantId- stable participant identityspec- complete desired Spaces state- Returns:
- typed participant handle
-
participant
public Optional<ParticipantHandle> participant(be.theking90000.mumble.controller.core.ParticipantId participantId) Looks up a current desired participant.- Parameters:
participantId- identity to find- Returns:
- typed handle, or empty after release or revocation
-
participants
- Returns:
- immutable point-in-time map of desired typed participants
-
observeSpace
Adds a space to the complete explicit observation set.- Parameters:
spaceKey- semantic key to observe- Returns:
- future completed when the change is accepted
-
unobserveSpace
Removes a space from the explicit observation set.- Parameters:
spaceKey- semantic key to stop observing- Returns:
- future completed when the change is accepted
-
explicitlyObservedSpaces
- Returns:
- immutable point-in-time copy of explicit observation keys
-
spaces
- Returns:
- immutable point-in-time copy of the latest decoded space cache
-
fetchSpace
Fetches one full snapshot without changing the observation set.- Parameters:
spaceKey- semantic key to fetch- Returns:
- future completed with the one-shot snapshot
-
stop
- Returns:
- future completed when the delegated Core session is locally closed
-
addSessionListener
Adds a listener for subsequent session transitions.- Parameters:
listener- listener to add
-
removeSessionListener
Removes a session listener; a missing listener is ignored.- Parameters:
listener- listener to remove
-
addSpaceListener
Adds a listener for subsequent full space replacements and closures.- Parameters:
listener- listener to add
-
removeSpaceListener
Removes a space listener; a missing listener is ignored.- Parameters:
listener- listener to remove
-