This JSF listener for UIViewRoot ensures that the necessary JavaScript code to open or close the
WebSocket is properly rendered depending on rendered and connected attributes.
Push
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Map | |
| public boolean | isListenerForSource(Object
the source that is inquiring about the
appropriateness of sending an event to this listener instance. source)Implements javax. UIViewRoot.
|
| public static boolean | |
| public void | processEvent(SystemEvent
the event)SystemEvent instance that
is being processed.Implements javax. rendered or connected attribute, then
render either the open() script or the close() script.
|
| public static void |
| SCRIPT_CLOSE | back to summary |
|---|---|
| private static final String SCRIPT_CLOSE | |
| SCRIPT_OPEN | back to summary |
|---|---|
| private static final String SCRIPT_OPEN | |
| WebsocketFacesListener | back to summary |
|---|---|
| public WebsocketFacesListener() | |
| getInitializedWebsockets | back to summary |
|---|---|
private static Map
| |
| isListenerForSource | back to summary |
|---|---|
| public boolean isListenerForSource(Object source) Implements javax. Only listens on
| |
| isNew | back to summary |
|---|---|
| public static boolean isNew(FacesContext context, UIWebsocket websocket) | |
| processEvent | back to summary |
|---|---|
| public void processEvent(SystemEvent event) throws AbortProcessingException Implements javax. If the websocket has just switched its
| |
| subscribeIfNecessary | back to summary |
|---|---|
| public static void subscribeIfNecessary(FacesContext context) | |