Class SocketChannelManager.ViewScope

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    SocketChannelManager

    @ViewScoped
    public static class SocketChannelManager.ViewScope
    extends Object
    implements Serializable
    This helps the web socket channel manager to hold view scoped web socket channel identifiers registered by <o:socket>.

    Since OmniFaces 4.6 this class is public instead of protected so it can be externally registered into environment-specific CDI bean management facility.

    Since:
    2.3
    Author:
    Bauke Scholtz
    See Also:
    SocketChannelManager, Serialized Form
    • Constructor Detail

      • ViewScope

        public ViewScope()
    • Method Detail

      • getChannels

        protected Map<String,​String> getChannels()
        Returns the view scoped channels.
        Returns:
        The view scoped channels.
      • deregisterViewScope

        @PreDestroy
        protected void deregisterViewScope()
        When current view scope is about to be destroyed, deregister all view scoped channels and explicitly close any open web sockets associated with it to avoid stale websockets.