Package io.goobi.viewer.managedbeans
Class SocketBean
java.lang.Object
io.goobi.viewer.managedbeans.SocketBean
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 Summary
ConstructorsConstructorDescriptionDefault constructor.SocketBean
(long minIdleSeconds) SocketBean
(long minIdleSeconds, org.omnifaces.cdi.PushContext backgroundTasksState) Constructor for tests with custom PushContext -
Method Summary
-
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
Send an "update" message to the socket channel- Parameters:
message
-
-
close
@PreDestroy public void close()
-