/*
* Copyright 2013, The Sporting Exchange Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2013, The Sporting Exchange Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated from rescriptServiceBindingDescriptor.ftl
package com.betfair.cougar.health.service.v3.rescript;
import com.betfair.cougar.health.service.v3.HealthServiceDefinition;
import java.util.ArrayList;
import java.util.List;
import com.betfair.cougar.api.export.Protocol;
import com.betfair.cougar.core.api.ServiceVersion;
import com.betfair.cougar.core.api.ev.OperationKey;
import com.betfair.cougar.transport.api.protocol.http.HttpServiceBindingDescriptor;
import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptOperationBindingDescriptor;
import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptParamBindingDescriptor;
import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptParamBindingDescriptor.ParamSource;
public class HealthRescriptServiceBindingDescriptor implements HttpServiceBindingDescriptor {
private final ServiceVersion serviceVersion = new ServiceVersion("v3.0");
private final String serviceName = "Health";
public HealthRescriptServiceBindingDescriptor() {
List<RescriptParamBindingDescriptor> isHealthyParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
isHealthyDescriptor = new RescriptOperationBindingDescriptor(HealthServiceDefinition.isHealthyKey, "/summary", "GET", isHealthyParamBindings , IsHealthyResponse.class);
List<RescriptParamBindingDescriptor> getDetailedHealthStatusParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
getDetailedHealthStatusDescriptor = new RescriptOperationBindingDescriptor(HealthServiceDefinition.getDetailedHealthStatusKey, "/detailed", "GET", getDetailedHealthStatusParamBindings , GetDetailedHealthStatusResponse.class);
operations = new RescriptOperationBindingDescriptor[] {
isHealthyDescriptor,
getDetailedHealthStatusDescriptor
};
}
@Override
public Protocol getServiceProtocol() {
return Protocol.RESCRIPT;
}
@Override
public String getServiceContextPath() {
return "/healthcheck/";
}
@Override
public RescriptOperationBindingDescriptor[] getOperationBindings() {
return operations;
}
@Override
public ServiceVersion getServiceVersion() {
return serviceVersion;
}
@Override
public String getServiceName() {
return serviceName;
}
private final RescriptOperationBindingDescriptor[] operations;
private final RescriptOperationBindingDescriptor isHealthyDescriptor;
private final RescriptOperationBindingDescriptor getDetailedHealthStatusDescriptor;
}