use of eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType in project UVMS-ExchangeModule-APP by UnionVMS.
the class ExchangeServiceBean method updateServiceStatus.
@Override
public ServiceResponseType updateServiceStatus(String serviceClassName, StatusType status, String username) throws ExchangeServiceException {
LOG.info("Update service status invoked in service layer: {} {} {}", serviceClassName, status, username);
try {
ServiceResponseType updatedServiceStatus = serviceRegistryModel.updatePluginStatus(serviceClassName, status, username);
sendAuditLogMessageForUpdateServiceStatus(serviceClassName, status, username);
return updatedServiceStatus;
} catch (ExchangeModelException e) {
throw new ExchangeServiceException(e.getMessage());
}
}
use of eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType in project UVMS-ExchangeModule-APP by UnionVMS.
the class PluginServiceBean method setServiceStatusOnRegister.
private void setServiceStatusOnRegister(String serviceClassName) throws ExchangeModelMapperException, ExchangeMessageException, ExchangeServiceException {
ServiceResponseType service = exchangeService.getService(serviceClassName);
if (service != null) {
StatusType status = service.getStatus();
if (StatusType.STARTED.equals(status)) {
LOG.info("Starting service {}", serviceClassName);
start(serviceClassName);
} else if (StatusType.STOPPED.equals(status)) {
LOG.info("Stopping service {}", serviceClassName);
stop(serviceClassName);
} else {
LOG.error("[ Status was null for service {} ]", serviceClassName);
}
}
}
use of eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType in project narayana by jbosstm.
the class CoordinatorCompletionParticipantClient method sendStatus.
/**
* Send a status request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendStatus(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier, final QName state) throws SoapFault, IOException {
MAPEndpoint coordinator = getCoordinator(endpoint, map);
AddressingHelper.installFromFaultTo(map, coordinator, identifier);
BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
port = getPort(endpoint, map, statusAction);
StatusType status = new StatusType();
status.setState(state);
port.statusOperation(status);
}
use of eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorPortTypeImpl method statusOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "StatusOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
public void statusOperation(@WebParam(name = "Status", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") StatusType parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final StatusType status = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorCompletionCoordinatorProcessor.getProcessor().status(status, inboundMap, arjunaContext);
}
});
}
use of eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionParticipantPortTypeImpl method statusOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "StatusOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
public void statusOperation(@WebParam(name = "Status", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") StatusType parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final StatusType status = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorCompletionParticipantProcessor.getProcessor().status(status, inboundMap, arjunaContext);
}
});
}
Aggregations