Class ChannelInSessionDelivery
java.lang.Object
com.iizix.server.push.engine.ChannelInSessionDelivery
- All Implemented Interfaces:
IInSessionDelivery
The in-session tier over the sessions' Push Notification (PN) channels (PUSH-PROPS-DESIGN section 9.1, ruled 2026-09-24 RR-14a; P4-10):
deliver(DeliveryTarget, IPushNotification) triggers DELIVER on the target session's PushChannelProps with the notification object as the Web Push leg carries it, and answers DeliveryOutcome.DELIVERED_IN_SESSION. The client shows it on its Service Worker registration where it has one, so that it looks and reports like a device push and its click goes through the worker, and with the in-app toaster otherwise.A target whose session is gone answers DeliveryOutcome.IN_APP_SESSION_USER_CLOSED_ALL_SESSIONS: the session was live when the plan was made and closed before dispatch, which is the code the engine's ruled fallback acts on (a device push under PREFER_IN_SESSION; under the other modes the devices were dispatched by the same send). A target whose session has no channel at all - which the enumerator never produces, since it lists only sessions with one - answers DeliveryOutcome.IN_APP_SESSION_USER_NOT_FOUND.
Runs on the engine's dispatch thread. Nothing here waits: the channel queues the event and the property chain posts the flush to the session's worker.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from interface IInSessionDelivery
NONEConstructor Summary
ConstructorsConstructorDescriptionCreates the seam over the sessions' environments: a session's channel is thePushChannelPropsunder its$env.Creates the seam with another channel lookup, for a test that has no gyros.Method Summary
Modifier and TypeMethodDescriptiondeliver(DeliveryTarget target, IPushNotification notification) Delivers a notification to a live client session.booleanChecks if in-session delivery is implemented and running.
Constructor Details
ChannelInSessionDelivery
public ChannelInSessionDelivery()Creates the seam over the sessions' environments: a session's channel is thePushChannelPropsunder its$env.ChannelInSessionDelivery
Creates the seam with another channel lookup, for a test that has no gyros.- Parameters:
channels- Maps a session to its channel, null for none.- Throws:
NullPointerException- Ifchannelsis null.
Method Details
isAvailable
public boolean isAvailable()Description copied from interface:IInSessionDeliveryChecks if in-session delivery is implemented and running.- Specified by:
isAvailablein interfaceIInSessionDelivery- Returns:
- true when live sessions are valid delivery targets.
deliver
Description copied from interface:IInSessionDeliveryDelivers a notification to a live client session.- Specified by:
deliverin interfaceIInSessionDelivery- Parameters:
target- The in-session target (DeliveryTarget.isInSession()).notification- The notification.- Returns:
DeliveryOutcome.DELIVERED_IN_SESSION, or one of theIN_APP_SESSION_*codes.