Class BulkActionsHandler
java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
org.qubership.atp.tdm.websocket.bulkaction.BulkActionsHandler
- All Implemented Interfaces:
org.springframework.web.socket.WebSocketHandler
- Direct Known Subclasses:
AbstractBulkDataLoadHandler,BulkDataCleanupHandler,BulkDataDropHandler,BulkDataLinksRefreshHandler
public abstract class BulkActionsHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CatalogRepositoryprotected final CurrentTimeprotected final EnvironmentsServiceprotected final org.qubership.atp.common.lock.LockManagerprotected final TdmMdcHelper -
Constructor Summary
ConstructorsConstructorDescriptionBulkActionsHandler(ExecutorService executorService, CatalogRepository catalogRepository, EnvironmentsService environmentsService, AbstractBulkActionMailSender mailSender, CurrentTime currentTime, org.qubership.atp.common.lock.LockManager lockManager, TdmMdcHelper mdcHelper) Constructor with parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetEnvName(List<LazyEnvironment> lazyEnvironments, UUID envId) Get environment name by environment Id.voidhandleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) abstract List<Future<BulkActionResult>> runBulkAction(org.springframework.web.socket.WebSocketSession session, ExecutorService executor, List<LazyEnvironment> lazyEnvironments, BulkActionConfig config, long processId) Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler
handleBinaryMessageMethods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler
afterConnectionClosed, afterConnectionEstablished, handleMessage, handlePongMessage, handleTransportError, supportsPartialMessages
-
Field Details
-
environmentsService
-
catalogRepository
-
currentTime
-
lockManager
protected final org.qubership.atp.common.lock.LockManager lockManager -
mdcHelper
-
-
Constructor Details
-
BulkActionsHandler
public BulkActionsHandler(@Qualifier("websocket") ExecutorService executorService, @Nonnull CatalogRepository catalogRepository, @Nonnull EnvironmentsService environmentsService, @Nonnull AbstractBulkActionMailSender mailSender, @Nonnull CurrentTime currentTime, @Nonnull org.qubership.atp.common.lock.LockManager lockManager, @Nonnull TdmMdcHelper mdcHelper) Constructor with parameters.
-
-
Method Details
-
handleTextMessage
public void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) - Overrides:
handleTextMessagein classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
getEnvName
Get environment name by environment Id.- Parameters:
lazyEnvironments- - lazy environments list.envId- - environment Id.- Returns:
- environment name string.
-
runBulkAction
public abstract List<Future<BulkActionResult>> runBulkAction(@Nonnull org.springframework.web.socket.WebSocketSession session, @Nonnull ExecutorService executor, @Nonnull List<LazyEnvironment> lazyEnvironments, @Nonnull BulkActionConfig config, long processId)
-