Search in sources :

Example 6 with APIEvent

use of org.wso2.carbon.apimgt.core.models.events.APIEvent in project carbon-apimgt by wso2.

the class APIGatewayPublisherImpl method changeAPIState.

@Override
public void changeAPIState(API api, String status) throws GatewayException {
    // create the message to be sent to the gateway. This contains the basic details of the API and target
    // lifecycle state.
    APIEvent gatewayDTO = new APIEvent(APIMgtConstants.GatewayEventTypes.API_STATE_CHANGE);
    gatewayDTO.setLabels(api.getLabels());
    gatewayDTO.setApiSummary(toAPISummary(api));
    publishToPublisherTopic(gatewayDTO);
}
Also used : APIEvent(org.wso2.carbon.apimgt.core.models.events.APIEvent)

Aggregations

APIEvent (org.wso2.carbon.apimgt.core.models.events.APIEvent)6 APISummary (org.wso2.carbon.apimgt.core.models.APISummary)2 ContainerBasedGatewayException (org.wso2.carbon.apimgt.core.exception.ContainerBasedGatewayException)1 GatewayException (org.wso2.carbon.apimgt.core.exception.GatewayException)1