Class BaseAtmosphereHandler

  • All Implemented Interfaces:
    org.atmosphere.cpr.AtmosphereHandler
    Direct Known Subclasses:
    ActivityStreamAtmosphereHandler, LogAtmosphereHandler

    public abstract class BaseAtmosphereHandler
    extends java.lang.Object
    implements org.atmosphere.cpr.AtmosphereHandler
    Base AtmosphereHandler implementation.
    Since:
    9.0.0
    Version:
    $Revision$ $Date$
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.atmosphere.cpr.Broadcaster getBroadcaster()
      Returns the broadcaster used by this handler.
      protected abstract java.lang.String getBroadcasterId()
      Returns the broadcaster identifier.
      SessionConfig getSessionConfig​(org.atmosphere.cpr.AtmosphereResource resource)
      Returns the SessionConfig object associated in the HttpSession of the given atmosphere resource.
      protected boolean isBroadcast​(org.atmosphere.cpr.AtmosphereResourceEvent event)
      Returns whether the given event is a message broadcast event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.atmosphere.cpr.AtmosphereHandler

        destroy, onRequest, onStateChange
    • Constructor Detail

      • BaseAtmosphereHandler

        public BaseAtmosphereHandler()
    • Method Detail

      • isBroadcast

        protected boolean isBroadcast​(org.atmosphere.cpr.AtmosphereResourceEvent event)
        Returns whether the given event is a message broadcast event.
        Parameters:
        event - the event.
        Returns:
        true if it is a message broadcast event, false otherwise.
        Since:
        9.0.0
      • getBroadcaster

        protected org.atmosphere.cpr.Broadcaster getBroadcaster()
        Returns the broadcaster used by this handler.
        Returns:
        the broadcaster.
        Since:
        9.0.0
      • getBroadcasterId

        protected abstract java.lang.String getBroadcasterId()
        Returns the broadcaster identifier.
        Returns:
        the broadcaster identifier.
        Since:
        9.0.0
      • getSessionConfig

        public SessionConfig getSessionConfig​(org.atmosphere.cpr.AtmosphereResource resource)
        Returns the SessionConfig object associated in the HttpSession of the given atmosphere resource.
        Parameters:
        resource - the atmosphere resource.
        Returns:
        the SessionConfig object, or null if the session does not exist or does not contain a SessionConfig or if the given resource is no longer valid.
        Since:
        9.0.0