Class PushChannelProps
- All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
$env that carries Push state and calls between the server and the client (PUSH-PROPS-DESIGN section 3, ruled 2026-09-24 RR-1 B; built by P4-06).Created by the client (RR-2 A): iz/EnvProps.js adds it to $env when iz/PushChannelProps.js is loaded, which iiziApp.html does and the Designer, Design Viewer and VSViewer pages do not, so that its absence means exactly "this session has no channel" and every client-bound call of the Java API fails no_device (RR-17 A). The server never predefines it, so EnvProps.onRemoteRootCreated() never makes it private. of(EnvProps) finds it.
State is properties (RR-19 A), written by the client: UUID the push UUID (contract 2.5, the device UUID report - empty means none could be established, so the device calls fail no_device), TRANSPORT the wire key of the transport the device is reached through (v VAPID, fc FCM, empty when it cannot receive PN), and PERM the permission as a cached view. The server writes KEY, the application's VAPID public key, when the session is created, so that a later click (P4-09) needs no round trip; never the private key, never the FCM service account. With it SKEY, the server's own * public key, so that a Browser already subscribed under it - inside iiziRun Developer - answers that subscription with P_VAPID_PUBLIC_KEY instead of key_conflict (PUSH-CLUSTER-DESIGN 3.3, B-10b, RR-21 C). And AUTH: true once the application session has an authenticated user - at creation, and when an in-app sign-in sets one later - the client draining its kept receipts only while it is true (design 7, ruled 2026-09-26 R-10 A). And APP and SERVER at creation, the session's canonical application ID and the push server ID (CC-DESIGN-PUSH-APPID-FILTER SV-4): the client sets its device half's target to them and drains only the receipts of this application (or *) and this server (or none).
Calls are remote events, each direction with its own sequence, repeated as literals with a comment in iz/PushChannelProps.js: server to client REMOTE_QUERY_STATE, REMOTE_SUBSCRIBE (P4-07), REMOTE_UNSUBSCRIBE and REMOTE_RESET (P4-08), REMOTE_DELIVER (the in-session tier, P4-10); client to server REMOTE_REPLY, REMOTE_ACTION_RESULT (the subscribe action, P4-09), REMOTE_SHOWN and REMOTE_CLICKED (the receipts, P4-11). Every switch is on getLocalID(): a remote event's getEventID() is always GEvent.REMOTE (RR-22, design 2.3). A server-bound request carries the request id P_REQUEST and is answered by a REPLY carrying it back with P_OK and the result members, or P_REASON (design 3.4, 3.5). A DELIVER carries the notification as P_NOTIFICATION and nothing replies: the client shows it, on its Service Worker registration where it has one so that it looks and reports like a device push, else with the in-app toaster (design 9.1, RR-14a).
Receipts (design 7, P4-11): the client reports SHOWN for a notification it displayed and CLICKED for a click on one or on one of its actions, each carrying P_MESSAGE (the server's message ID), P_APP_ID, P_TOPIC, P_SENT and P_TIME (the device's clock), and P_SERVER when the device recorded the push server ID (SV-4), a click also P_ACTION. They arrive on the connection's thread and go to the PushChannelProps.IReceiptListener the server set at session creation (setReceiptListener(PushChannelProps.IReceiptListener)), which builds the receipt as the session's user and hands it to the engine's events for every listening session of that user and application, with the duplicates of design 7.4 dropped there. A report with no message ID, or on a channel without a listener, is logged at INFO and dropped.
The subscribe action (design 8.2-8.4, P4-09, RR-6 B, RR-7 A): the server writes the configured actions into ACT through setAction(String, String, PushChannelProps.IReplyListener) - one entry per component, its atom path from the root and the Topic, keyed by an action id from a per-channel counter - and keeps each action's listener here. The client looks a clicked UIButton up in act inside the DOM click, subscribes the device there, and reports REMOTE_ACTION_RESULT once per click; onRemoteEvent(RemoteEvent) hands it to the action's listener on the connection's thread, or, for an action removed meanwhile, to the listener of setOrphanActionListener(PushChannelProps.IReplyListener), so that a subscription the device now holds is still stored (design 8.4).
Correlation and deadlines (RR-18 A, RR-11 A): a table of pending requests keyed by the id, from a per-channel counter never reused; several may be pending at once and the client answers in arrival order. Every request has a deadline; at the deadline the entry is removed and the listener gets timeout. A reply with an unknown id - late, or a second answer - is logged at INFO and dropped (design 6.1, 6.3). At disposal every pending entry is logged at INFO as not completed and dropped (design 6.2).
Threads. A reply arrives on the connection's thread and a deadline on the timer's: the PushChannelProps.IReplyListener is called there, at once, and it is the caller's - the session API's - to post the outcome to the session's worker (design 5). Nothing here posts.
- Author:
- Christopher Mindus
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA configured subscribe action (P4-09, design 8.2): the entrysetAction(String, String, PushChannelProps.IReplyListener)wrote intoACT, and the listener of each click's outcome.static interfaceThe listener of the receipts the client reports (P4-11): called on the connection's thread, never on a session worker; the server's listener hands the receipt to the engine's events, which post to the listening sessions' workers.static interfaceThe listener of a request's outcome: called ONCE, on the connection's thread for a reply and on the timer's thread for a deadline, never on a session worker - the caller posts.Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe "act" PropCnr: the configured subscribe actions (P4-09, design 8.2), written by the server throughsetAction(String, String, PushChannelProps.IReplyListener): one child container per action, namedaand the action id, carryingP_PATH- the component's atom path from the root joined with/, the addressing remote events use (RR-7 A) - andP_TOPIC.static final AtomThe atom ofACT.static final StringThe "app" StringProp: the session's canonical application ID - the onedata.iizi.app_idnames, never an alias the client was started with - written withSERVER(SV-4).static final AtomThe atom of the channel under$env.static final StringThe atom name of the channel under$env: "PushChannel", named by its class asFlashandNativeSettingare.static final StringThe "auth" BoolProp: true once the application session has an authenticated user, written by the server at the channel's creation and again when the user is set later (an in-app sign-in,AppSessionGyro.changeExternallyAuthenticatedUser); absent before.static final StringThe "key" StringProp: the application's VAPID public key, base64url, written by the server when the session is created; absent when the application has none.static final StringTheCLICKEDmember "action": theactions[].actionidentity clicked, empty for a click on the notification itself; a string.static final StringTheACTION_RESULTmember "action_id": the id of the subscribe action clicked, assetAction(String, String, PushChannelProps.IReplyListener)allocated it; an int (P4-09).static final StringTheRESETmember "all": a boolean, true forresetDeviceEverywhere- every application's rows of the user on this device are gone, and a Browser gives up its subscription whatever key it was made under (P4-b, P4-08); false forresetDevice, this application only (RR-15 B).static final StringThe receipt member "app_id": the application ID of the notification,data.iizi.app_id; a string.static final StringTheUNSUBSCRIBEandRESETmember "drop": a boolean, true when the server holds no further row of this application for this device, so that the device may give up its subscription (design 4.2, P4-08).static final StringTheUNSUBSCRIBEandRESETreply member "dropped": a boolean, whether the device gave up a subscription; for the log only (P4-08).static final StringTheSUBSCRIBEreply member "fcm_project": the Firebase project ID the device's FCM token belongs to, as iiziRun's build wrote it intosetup.jsfrom the app's owngoogle-services.jsonorGoogleService-Info.plist(izRun.FCM_PROJECTfor the device's platform, CC-FIX-PUSHDEV-PROJECT); absent when the device cannot tell.static final StringTheSUBSCRIBEreply member "fcm_token": the FCM registration token of a Cordova device, a non-empty string (P4-07).static final StringThe receipt member "message": the message ID the server assigned,data.iizi.messageof the notification (PUSH-WIRE-CONTRACT section 6.2); a string.static final StringTheDELIVERmember "n": the notification object as the Web Push leg carries it (PUSH-WIRE-CONTRACT section 6.1,titlebeside the options, with the server's four members underdata.iizi; never the FCM copy), as one JSON text.static final StringThe reply's success member "ok": a boolean.static final StringTheACTentry member "path": the component's atom path from the root, joined with/; a string (P4-09).static final StringThe reply's permission member "perm": asPERM.static final StringThe reply's reason member "reason" on a failure: a reason code ofPushNotificationException.static final StringThe request id member "r": an int from the per-channel counter, on every server-bound request and its reply.static final StringThe receipt member "sent": when the server sent the notification,data.iizi.sent; a long, epoch milliseconds.static final StringThe receipt member "server": the push server ID of the notification,data.iizi.server; a string, absent or empty when the device recorded none (a server, device half or Service Worker from before O-4a).static final StringThe reply's subscribed member "subscribed": a boolean, the device holds a subscription under this application's key, or an FCM token.static final StringThe receipt member "time": when the device recorded the event, by its own clock; a long, epoch milliseconds.static final StringThe receipt member "topic": the Topic of the notification,data.iizi.topic; a string, empty for the application level.static final StringThe reply's transport member "transport": asTRANSPORT.static final StringTheSUBSCRIBEreply member "user_agent": the user agent the device reports, stored with the row as the HTTPsubscribestores the request's (P4-07).static final StringTheSUBSCRIBEreply member "vapid_public_key": the VAPID public key, base64url, the Browser's subscription inP_VAPID_SUBSCRIPTIONwas made under, when that is notKEYbutSKEY- the server's own*key, a Browser inside iiziRun Developer.static final StringTheSUBSCRIBEreply member "vapid_subscription": the Browser's push subscription exactly asPushSubscription.toJSON()emits it (endpoint,keys.p256dh,keys.auth), as one JSON text - the subscription of PUSH-WIRE-CONTRACT section 5.2, stored verbatim and never sent back to a client (P4-07).static final StringThe "perm" StringProp: the permission as the client last reported it, one ofprompt,granted,deniedorunsupported(the constants ofPushPermission); a cached view, which is whyqueryDeviceStatealways round-trips.static final intClient to server 2:ACTION_RESULT, the outcome of one click on a configured subscribe action (P4-09, design 8.3, 8.4), withP_ACTION_ID,P_OK,P_TOPIC(the action's, echoed so that a subscription made after the action was removed is still stored) and then, as aSUBSCRIBEreply carries them,P_VAPID_SUBSCRIPTION(withP_VAPID_PUBLIC_KEY) orP_FCM_TOKEN(withP_FCM_PROJECT) andP_USER_AGENT, orP_REASON:permission_denied,dismissed(the prompt closed without an answer),key_conflict,not_configured,unsupported,gesture_required,internalorno_user(the session has no authenticated user,AUTHfalse: answered at once, before any prompt, CC-FIX-PWA-FOLLOWUPS PWA-D-6).static final intClient to server 4:CLICKED, a notification or one of its actions was clicked, with the members ofREMOTE_SHOWNandP_ACTION(P4-11, design 7).static final intServer to client 5:DELIVER, the notification object of the in-session tier asP_NOTIFICATION; nothing replies (P4-10, design 9.1).static final intServer to client 1:QUERY_STATE, withP_REQUEST; answered byREMOTE_REPLYwithP_PERM,P_TRANSPORTandP_SUBSCRIBED.static final intstatic final intServer to client 4:RESET, withP_REQUEST,P_DROPandP_ALL(P4-08): the server has removed the session user's rows on this device - of this application only (resetDevice, RR-15 B), or of every application (resetDeviceEverywhere, P4-b, the HTTPreset {}) - and the device drops as for anUNSUBSCRIBE: withP_ALLa Browser gives up its subscription whatever key it was made under.static final intstatic final intServer to client 2:SUBSCRIBE, withP_REQUESTandP_TOPIC(P4-07, design 8.5): the client subscribes the device for this application and answersREMOTE_REPLYwithP_VAPID_SUBSCRIPTION(a Browser, withP_VAPID_PUBLIC_KEYwhen the subscription was made underSKEY) orP_FCM_TOKEN(Cordova, withP_FCM_PROJECTwhen it knows its Firebase project) andP_USER_AGENT, or withP_REASON:permission_denied,gesture_required(a Browser whose permission is not yet granted, or whosepushManagerrefused outside a click),key_conflict(a Browser subscribed under another VAPID key thanKEYorSKEY, never replaced),not_configured(the server wrote noKEY),unsupportedorinternal.static final intServer to client 3:UNSUBSCRIBE, withP_REQUEST,P_TOPICandP_DROP(P4-08, design 4.2): the server has already removed the row, and tells the device whether any row of this application remains for it; when none does, a Browser gives up the push subscription it holds under this application's key - one under another key is not this application's and stays - while a Cordova device keeps its FCM token, which every application on the device shares.static final StringThe "server" StringProp: the push server ID (PUSH-WIRE-CONTRACT 6.2,data.iizi.server), written by the server when the session is created while its engine runs; absent otherwise (CC-DESIGN-PUSH-APPID-FILTER SV-4).static final StringThe "skey" StringProp: the server's own*VAPID public key, base64url, written by the server withKEY; absent when the server has none.static final StringThe "transport" StringProp: the wire key of the transport the device is reached through,vorfc(PushTransport.wireKey); empty when the device cannot receive Push Notification.static final StringThe "uuid" StringProp: the push UUID of the device (contract 2.5), written by the client; empty when none could be established.Fields inherited from class PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields inherited from class GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_ATTR_STRING_SECRET, PROP_USER_1, PROP_USER_2Fields inherited from interface IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EQC_SAVE_RELEVANT_ONLY, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEConstructor Summary
ConstructorsConstructorDescriptionCreates the channel without a name.PushChannelProps(Atom atom) Creates the channel with a name.Method Summary
Modifier and TypeMethodDescriptionclone()Clones the channel: the pending table and the action table are not cloned.booleanDelivers a notification in-session, down this channel (the in-session tier, P4-10, design 9.1): triggersREMOTE_DELIVERwith the notification asP_NOTIFICATION.Gets a configured subscribe action by its component path.Gets the configured subscribe actions, for diagnostics and tests.getApp()Gets the canonical application ID the server wrote with the push server ID.Gets the push UUID the client reported.intGets the number of requests waiting for the client, for diagnostics and tests.Gets the permission the client last reported: a cached view.Gets the application's VAPID public key the server wrote.Gets the push server ID the server wrote.Gets the server's own*VAPID public key the server wrote.Gets the transport the client reported.booleanGets whether the server has written that the application session has an authenticated user.static PushChannelPropsFinds the channel of a session.protected voidCalled when the channel is disposed of, with its root: every pending request is logged at INFO as not completed and dropped; the listener is not called (design 6.2).voidonRemoteEvent(RemoteEvent event) Called when a remote property event should be processed by this property: aREMOTE_REPLYcompletes its pending request, aREMOTE_ACTION_RESULTgoes to its action's listener, aREMOTE_SHOWNorREMOTE_CLICKEDgoes to the receipt listener.booleanremoveAction(String path) Removes the subscribe action of a component (design 8.2): a no-op when it has none.intrequest(int localID, String operation, PropCnr params, long deadlineMillis, PushChannelProps.IReplyListener listener) Sends a request to the client and registers its outcome listener and deadline.intsetAction(String path, String topic, PushChannelProps.IReplyListener listener) Configures the subscribe action of a component (design 8.2): writes the entry intoACT, replacing the entry of the same path, and keeps the listener.booleansetAuthenticated(boolean authenticated) Sets whether the application session has an authenticated user, the server's write that lets the client drain its receipts (R-10 A).voidSets the listener of a successfulACTION_RESULTwhose action was removed meanwhile (design 8.4): the device now holds the subscription, and a row nobody stores is a device the server cannot reach, so the server's listener stores it anyway - the Topic is the result's.booleansetPublicKey(String key) Sets the application's VAPID public key for the client, the server's one write.voidSets the listener of the receipts the client reports (P4-11), the server's one at session creation; without one every report is logged at INFO and dropped.booleanSets the push server ID and the session's canonical application ID for the client (SV-4), the application first, so that the client knows both once the server ID arrives.booleansetServerPublicKey(String key) Sets the server's own*VAPID public key for the client (B-10b, RR-21 C), written with the application's.voidsetTimerEngine(ITimerEngine engine) Sets the timer engine the deadlines are registered with, e.g.protected booleanshouldSerializeToXML(int programType) The channel is never written to XML.static PushPermissiontoPermission(String perm) Maps a permission as the client reports it to the constant.Methods inherited from class PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializePropTree, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isPropValueTreeLockNeeded, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hashCode, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropErrorPersisted, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropForEditorAtCreation, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropSaveRelevant, isPropSecret, isPropSecretCapable, isPropUSER, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onInitialize, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropSecret, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, throwIfReadOnly, toNativeValue, toShortString, toShortString, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface IPropCnr
canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
Field Details
ATOM_NAME
The atom name of the channel under$env: "PushChannel", named by its class asFlashandNativeSettingare.- See Also:
ATOM
The atom of the channel under$env.UUID
The "uuid" StringProp: the push UUID of the device (contract 2.5), written by the client; empty when none could be established.- See Also:
TRANSPORT
The "transport" StringProp: the wire key of the transport the device is reached through,vorfc(PushTransport.wireKey); empty when the device cannot receive Push Notification. Written by the client.- See Also:
PERM
The "perm" StringProp: the permission as the client last reported it, one ofprompt,granted,deniedorunsupported(the constants ofPushPermission); a cached view, which is whyqueryDeviceStatealways round-trips.- See Also:
KEY
The "key" StringProp: the application's VAPID public key, base64url, written by the server when the session is created; absent when the application has none.- See Also:
SKEY
The "skey" StringProp: the server's own*VAPID public key, base64url, written by the server withKEY; absent when the server has none. A Browser whose subscription was made under it - iiziRun's, inside iiziRun Developer - answers aSUBSCRIBEor a subscribe action's click with that subscription andP_VAPID_PUBLIC_KEY, and the server stores a row of this application signed with*'s pair (PUSH-CLUSTER-DESIGN 3.3, B-10b, RR-21 C); a subscription under any other key stayskey_conflict.- See Also:
AUTH
The "auth" BoolProp: true once the application session has an authenticated user, written by the server at the channel's creation and again when the user is set later (an in-app sign-in,AppSessionGyro.changeExternallyAuthenticatedUser); absent before. The client drains its receipt queue only while it is true, and again when it turns true (design 7, R-10 A): a receipt reported to a session without a user would be dropped.- See Also:
SERVER
The "server" StringProp: the push server ID (PUSH-WIRE-CONTRACT 6.2,data.iizi.server), written by the server when the session is created while its engine runs; absent otherwise (CC-DESIGN-PUSH-APPID-FILTER SV-4). The client narrows its device half's target to it and keeps in the device's queue the receipts that name another server.- See Also:
APP
ACT
The "act" PropCnr: the configured subscribe actions (P4-09, design 8.2), written by the server throughsetAction(String, String, PushChannelProps.IReplyListener): one child container per action, namedaand the action id, carryingP_PATH- the component's atom path from the root joined with/, the addressing remote events use (RR-7 A) - andP_TOPIC. The client looks a clickedUIButtonup here, inside the DOM click. Absent until the first action is configured.- See Also:
ACT_ATOM
REMOTE_QUERY_STATE
public static final int REMOTE_QUERY_STATEServer to client 1:QUERY_STATE, withP_REQUEST; answered byREMOTE_REPLYwithP_PERM,P_TRANSPORTandP_SUBSCRIBED.- See Also:
REMOTE_SUBSCRIBE
public static final int REMOTE_SUBSCRIBEServer to client 2:SUBSCRIBE, withP_REQUESTandP_TOPIC(P4-07, design 8.5): the client subscribes the device for this application and answersREMOTE_REPLYwithP_VAPID_SUBSCRIPTION(a Browser, withP_VAPID_PUBLIC_KEYwhen the subscription was made underSKEY) orP_FCM_TOKEN(Cordova, withP_FCM_PROJECTwhen it knows its Firebase project) andP_USER_AGENT, or withP_REASON:permission_denied,gesture_required(a Browser whose permission is not yet granted, or whosepushManagerrefused outside a click),key_conflict(a Browser subscribed under another VAPID key thanKEYorSKEY, never replaced),not_configured(the server wrote noKEY),unsupportedorinternal.- See Also:
REMOTE_UNSUBSCRIBE
public static final int REMOTE_UNSUBSCRIBEServer to client 3:UNSUBSCRIBE, withP_REQUEST,P_TOPICandP_DROP(P4-08, design 4.2): the server has already removed the row, and tells the device whether any row of this application remains for it; when none does, a Browser gives up the push subscription it holds under this application's key - one under another key is not this application's and stays - while a Cordova device keeps its FCM token, which every application on the device shares. Answered byREMOTE_REPLYwithP_DROPPED.- See Also:
REMOTE_RESET
public static final int REMOTE_RESETServer to client 4:RESET, withP_REQUEST,P_DROPandP_ALL(P4-08): the server has removed the session user's rows on this device - of this application only (resetDevice, RR-15 B), or of every application (resetDeviceEverywhere, P4-b, the HTTPreset {}) - and the device drops as for anUNSUBSCRIBE: withP_ALLa Browser gives up its subscription whatever key it was made under. Answered byREMOTE_REPLYwithP_DROPPED.- See Also:
REMOTE_DELIVER
public static final int REMOTE_DELIVERServer to client 5:DELIVER, the notification object of the in-session tier asP_NOTIFICATION; nothing replies (P4-10, design 9.1). Sent bydeliver(String).- See Also:
REMOTE_REPLY
REMOTE_ACTION_RESULT
public static final int REMOTE_ACTION_RESULTClient to server 2:ACTION_RESULT, the outcome of one click on a configured subscribe action (P4-09, design 8.3, 8.4), withP_ACTION_ID,P_OK,P_TOPIC(the action's, echoed so that a subscription made after the action was removed is still stored) and then, as aSUBSCRIBEreply carries them,P_VAPID_SUBSCRIPTION(withP_VAPID_PUBLIC_KEY) orP_FCM_TOKEN(withP_FCM_PROJECT) andP_USER_AGENT, orP_REASON:permission_denied,dismissed(the prompt closed without an answer),key_conflict,not_configured,unsupported,gesture_required,internalorno_user(the session has no authenticated user,AUTHfalse: answered at once, before any prompt, CC-FIX-PWA-FOLLOWUPS PWA-D-6). Not a reply: each click is a new result and the action's listener is called once per click (design 6.3, 8.4).- See Also:
REMOTE_SHOWN
REMOTE_CLICKED
public static final int REMOTE_CLICKEDClient to server 4:CLICKED, a notification or one of its actions was clicked, with the members ofREMOTE_SHOWNandP_ACTION(P4-11, design 7).- See Also:
P_REQUEST
The request id member "r": an int from the per-channel counter, on every server-bound request and its reply.- See Also:
P_OK
P_REASON
The reply's reason member "reason" on a failure: a reason code ofPushNotificationException.- See Also:
P_PERM
P_TRANSPORT
P_SUBSCRIBED
The reply's subscribed member "subscribed": a boolean, the device holds a subscription under this application's key, or an FCM token.- See Also:
P_VAPID_SUBSCRIPTION
TheSUBSCRIBEreply member "vapid_subscription": the Browser's push subscription exactly asPushSubscription.toJSON()emits it (endpoint,keys.p256dh,keys.auth), as one JSON text - the subscription of PUSH-WIRE-CONTRACT section 5.2, stored verbatim and never sent back to a client (P4-07).- See Also:
P_VAPID_PUBLIC_KEY
TheSUBSCRIBEreply member "vapid_public_key": the VAPID public key, base64url, the Browser's subscription inP_VAPID_SUBSCRIPTIONwas made under, when that is notKEYbutSKEY- the server's own*key, a Browser inside iiziRun Developer. The server stores the row under it, to be signed with*'s pair, when it is the server's own key or the application's, and refuses any otherkey_conflict(PUSH-CLUSTER-DESIGN 3.3, B-10b, RR-21 C). Absent, the row is the key the server wrote intoKEY. The member name is the HTTPsubscribe's (PUSH-WIRE-CONTRACT 5.2).- See Also:
P_FCM_TOKEN
TheSUBSCRIBEreply member "fcm_token": the FCM registration token of a Cordova device, a non-empty string (P4-07).- See Also:
P_FCM_PROJECT
TheSUBSCRIBEreply member "fcm_project": the Firebase project ID the device's FCM token belongs to, as iiziRun's build wrote it intosetup.jsfrom the app's owngoogle-services.jsonorGoogleService-Info.plist(izRun.FCM_PROJECTfor the device's platform, CC-FIX-PUSHDEV-PROJECT); absent when the device cannot tell. The server stores an FCM row of the application's own project, and of the server's own*project - a device built as iiziRun Developer - recording that project so the row is signed with*'s credentials (PUSH-CLUSTER-DESIGN 3.3, B-10b, RR-21 C); it refuses any otherkey_conflict. A device that names none is checked with FCM (validate_only, CC-PUSHDEV-VALIDATE-ONLY).- See Also:
P_USER_AGENT
TheSUBSCRIBEreply member "user_agent": the user agent the device reports, stored with the row as the HTTPsubscribestores the request's (P4-07).- See Also:
P_DROP
TheUNSUBSCRIBEandRESETmember "drop": a boolean, true when the server holds no further row of this application for this device, so that the device may give up its subscription (design 4.2, P4-08).- See Also:
P_ALL
TheRESETmember "all": a boolean, true forresetDeviceEverywhere- every application's rows of the user on this device are gone, and a Browser gives up its subscription whatever key it was made under (P4-b, P4-08); false forresetDevice, this application only (RR-15 B).- See Also:
P_DROPPED
TheUNSUBSCRIBEandRESETreply member "dropped": a boolean, whether the device gave up a subscription; for the log only (P4-08).- See Also:
P_NOTIFICATION
TheDELIVERmember "n": the notification object as the Web Push leg carries it (PUSH-WIRE-CONTRACT section 6.1,titlebeside the options, with the server's four members underdata.iizi; never the FCM copy), as one JSON text.- See Also:
P_MESSAGE
The receipt member "message": the message ID the server assigned,data.iizi.messageof the notification (PUSH-WIRE-CONTRACT section 6.2); a string.- See Also:
P_APP_ID
The receipt member "app_id": the application ID of the notification,data.iizi.app_id; a string.- See Also:
P_TOPIC
The receipt member "topic": the Topic of the notification,data.iizi.topic; a string, empty for the application level. Also the Topic of aSUBSCRIBE(P4-07) or anUNSUBSCRIBE(P4-08) request.- See Also:
P_SENT
The receipt member "sent": when the server sent the notification,data.iizi.sent; a long, epoch milliseconds.- See Also:
P_TIME
The receipt member "time": when the device recorded the event, by its own clock; a long, epoch milliseconds.- See Also:
P_SERVER
The receipt member "server": the push server ID of the notification,data.iizi.server; a string, absent or empty when the device recorded none (a server, device half or Service Worker from before O-4a). A receipt naming another server is dropped by the engine (SV-5).- See Also:
P_ACTION
TheCLICKEDmember "action": theactions[].actionidentity clicked, empty for a click on the notification itself; a string.- See Also:
P_ACTION_ID
TheACTION_RESULTmember "action_id": the id of the subscribe action clicked, assetAction(String, String, PushChannelProps.IReplyListener)allocated it; an int (P4-09).- See Also:
P_PATH
Constructor Details
PushChannelProps
public PushChannelProps()Creates the channel without a name.PushChannelProps
Method Details
clone
Clones the channel: the pending table and the action table are not cloned.shouldSerializeToXML
protected boolean shouldSerializeToXML(int programType) The channel is never written to XML.- Overrides:
shouldSerializeToXMLin classGProp<GProp<?>[]>- Parameters:
programType- FromPropFactory.getProgramType().- Returns:
- false.
of
Finds the channel of a session.- Parameters:
env- The session's environment properties, or null.- Returns:
- The channel the client created under
$env, or null when the session has none: a Designer, Design Viewer or VSViewer session, or a client built before P4.
getDeviceUUID
Gets the push UUID the client reported.- Returns:
- The UUID, or null when the client reported none or an empty one.
getTransport
Gets the transport the client reported.- Returns:
- The transport, or null when the device cannot receive Push Notification or the client reported nothing.
getPermission
Gets the permission the client last reported: a cached view.- Returns:
- The permission,
PushPermission.UNSUPPORTEDwhen nothing was reported.
toPermission
Maps a permission as the client reports it to the constant.- Parameters:
perm-promptor the Browser'sdefault,granted,denied,unsupported, or null.- Returns:
- The permission,
PushPermission.UNSUPPORTEDfor null or an unknown value.
setPublicKey
Sets the application's VAPID public key for the client, the server's one write.- Parameters:
key- The base64url public key, or null to remove it.- Returns:
- true if changed.
getPublicKey
Gets the application's VAPID public key the server wrote.- Returns:
- The key, or null.
setServerPublicKey
Sets the server's own*VAPID public key for the client (B-10b, RR-21 C), written with the application's.- Parameters:
key- The base64url public key, or null to remove it.- Returns:
- true if changed.
getServerPublicKey
Gets the server's own*VAPID public key the server wrote.- Returns:
- The key, or null.
setAuthenticated
public boolean setAuthenticated(boolean authenticated) Sets whether the application session has an authenticated user, the server's write that lets the client drain its receipts (R-10 A).- Parameters:
authenticated- true once the session has an authenticated user.- Returns:
- true if changed.
isAuthenticated
public boolean isAuthenticated()Gets whether the server has written that the application session has an authenticated user.- Returns:
- true when written true; false when absent or false.
setServer
Sets the push server ID and the session's canonical application ID for the client (SV-4), the application first, so that the client knows both once the server ID arrives.- Parameters:
serverId- The push server ID,PushEngine.getServerId(); null writes nothing.appID- The canonical application ID of the session.- Returns:
- true if either changed.
getServer
getApp
Gets the canonical application ID the server wrote with the push server ID.- Returns:
- The ID, or null.
setTimerEngine
Sets the timer engine the deadlines are registered with, e.g. the client session's.- Parameters:
engine- The engine, or null for the system's.
setReceiptListener
Sets the listener of the receipts the client reports (P4-11), the server's one at session creation; without one every report is logged at INFO and dropped.- Parameters:
listener- The listener, or null for none.
getPendingCount
public int getPendingCount()Gets the number of requests waiting for the client, for diagnostics and tests.- Returns:
- The count.
request
public int request(int localID, String operation, PropCnr params, long deadlineMillis, PushChannelProps.IReplyListener listener) Sends a request to the client and registers its outcome listener and deadline.- Parameters:
localID- The server-to-client event, e.g.REMOTE_QUERY_STATE.operation- The operation, e.g.queryDeviceState, for the log lines.params- The parameters, or null for none but the request id, which is added.deadlineMillis- The deadline in milliseconds from now (RR-11 A: 30 s, 5 min for a subscribe).listener- The outcome listener, called once.- Returns:
- The request id.
- Throws:
IllegalStateException- If the channel is disposed of.NullPointerException- Ifoperationorlisteneris null.
deliver
Delivers a notification in-session, down this channel (the in-session tier, P4-10, design 9.1): triggersREMOTE_DELIVERwith the notification asP_NOTIFICATION. Nothing replies; the client shows it and, from P4-11 on, reportsSHOWN. Called on the engine's thread; the flush to the client is posted to the session's worker by the property chain, as for every change under the root.- Parameters:
notification- The notification object as the Web Push leg carries it (contract 6.1, withdata.iizi), as JSON text.- Returns:
- true when sent, false when the channel is disposed of.
- Throws:
NullPointerException- Ifnotificationis null.
setAction
Configures the subscribe action of a component (design 8.2): writes the entry intoACT, replacing the entry of the same path, and keeps the listener. The client runs the action inside the component's DOM click and reports each outcome asREMOTE_ACTION_RESULT, which reaches the listener once per click. Called on the session's worker, as every property write by application code is.- Parameters:
path- The component's atom path from the root, joined with/.topic- The Topic, the empty string for the application-level subscription.listener- The listener of each click's outcome, called on the connection's thread.- Returns:
- The action id.
- Throws:
IllegalStateException- If the channel is disposed of.NullPointerException- If a parameter is null.
removeAction
Removes the subscribe action of a component (design 8.2): a no-op when it has none. A click result that arrives after the removal goes to the orphan listener.- Parameters:
path- The component's atom path from the root, joined with/.- Returns:
- true if an action was removed.
getActions
Gets the configured subscribe actions, for diagnostics and tests.- Returns:
- The actions, in no particular order.
getAction
Gets a configured subscribe action by its component path.- Parameters:
path- The component's atom path from the root, joined with/.- Returns:
- The action, or null when the component has none.
setOrphanActionListener
Sets the listener of a successfulACTION_RESULTwhose action was removed meanwhile (design 8.4): the device now holds the subscription, and a row nobody stores is a device the server cannot reach, so the server's listener stores it anyway - the Topic is the result's. A failed result of a removed action is logged at INFO and dropped.- Parameters:
listener- The listener, called on the connection's thread with the result's parameters and no failure; null for none.
onRemoteEvent
Called when a remote property event should be processed by this property: aREMOTE_REPLYcompletes its pending request, aREMOTE_ACTION_RESULTgoes to its action's listener, aREMOTE_SHOWNorREMOTE_CLICKEDgoes to the receipt listener. Switches ongetLocalID(), never ongetEventID()(RR-22).- Specified by:
onRemoteEventin interfaceIGProp<GProp<?>[]>- Overrides:
onRemoteEventin classGProp<GProp<?>[]>- Parameters:
event- The remote event.
onPropDispose
protected void onPropDispose()Called when the channel is disposed of, with its root: every pending request is logged at INFO as not completed and dropped; the listener is not called (design 6.2). The configured subscribe actions go with the screen they belonged to.- Overrides:
onPropDisposein classPropCnr