use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360ComponentService method getThriftComponentClient.
private ComponentService.Iface getThriftComponentClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/components/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new ComponentService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360LicenseService method getThriftLicenseClient.
private LicenseService.Iface getThriftLicenseClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/licenses/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new LicenseService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360VulnerabilityService method getThriftVulnerabilityClient.
private VulnerabilityService.Iface getThriftVulnerabilityClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/vulnerabilities/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new VulnerabilityService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360AttachmentService method getThriftComponentClient.
private ComponentService.Iface getThriftComponentClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/components/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new ComponentService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class ThriftClients method makeProtocol.
/**
* Creates a Thrift Compact Protocol object linked to the given address
*/
private static TProtocol makeProtocol(String url, String service) {
THttpClient thriftClient = null;
final String destinationAddress = url + service;
try {
thriftClient = new THttpClient(destinationAddress);
} catch (TTransportException e) {
log.error("cannot connect to backend on " + destinationAddress, e);
}
return new TCompactProtocol(thriftClient);
}
Aggregations