Class SocketBean

java.lang.Object
io.goobi.viewer.managedbeans.SocketBean

@Named @ApplicationScoped public class SocketBean extends Object
Application scoped bean which handles socket updates for indexer and background tasks status. Only notifies the socket chanell at most every 2 seconds to avoid concurrent subsequent ajax request
  • Constructor Details

    • SocketBean

      public SocketBean()
      Default constructor. Instantiates a fixed schedule thread
    • SocketBean

      public SocketBean(long minIdleSeconds)
    • SocketBean

      public SocketBean(long minIdleSeconds, org.omnifaces.cdi.PushContext backgroundTasksState)
      Constructor for tests with custom PushContext
      Parameters:
      backgroundTasksState -
  • Method Details

    • send

      public void send(String message)
      Send an "update" message to the socket channel
      Parameters:
      message -
    • close

      @PreDestroy public void close()