Search in sources :

Example 1 with StatusType

use of org.openarchives.oai._2.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);
        }
    }
}
Also used : ServiceResponseType(eu.europa.ec.fisheries.schema.exchange.service.v1.ServiceResponseType) StatusType(eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType)

Example 2 with StatusType

use of org.openarchives.oai._2.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);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 3 with StatusType

use of org.openarchives.oai._2.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);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 4 with StatusType

use of org.openarchives.oai._2.StatusType in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorClient 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 {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".sendStatus");
    }
    MAPEndpoint participant = getParticipant(endpoint, map);
    AddressingHelper.installFromFaultTo(map, participant, identifier);
    BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
    port = getPort(endpoint, map, statusAction);
    StatusType status = new StatusType();
    status.setState(state);
    port.statusOperation(status);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) BusinessAgreementWithParticipantCompletionCoordinatorPortType(org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType)

Example 5 with StatusType

use of org.openarchives.oai._2.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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType) BusinessAgreementWithCoordinatorCompletionParticipantPortType(org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType)

Aggregations

StatusType (org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType)8 Task (com.arjuna.services.framework.task.Task)4 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)4 Action (javax.xml.ws.Action)4 MessageContext (javax.xml.ws.handler.MessageContext)4 MAP (org.jboss.ws.api.addressing.MAP)4 MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)4 ServiceResponseType (eu.europa.ec.fisheries.schema.exchange.service.v1.ServiceResponseType)1 StatusType (eu.europa.ec.fisheries.schema.exchange.service.v1.StatusType)1 BusinessAgreementWithCoordinatorCompletionCoordinatorPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionCoordinatorPortType)1 BusinessAgreementWithCoordinatorCompletionParticipantPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType)1 BusinessAgreementWithParticipantCompletionCoordinatorPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType)1 BusinessAgreementWithParticipantCompletionParticipantPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType)1