use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class TestUserClient method main.
public static void main(String[] args) throws TException, IOException {
THttpClient thriftClient = new THttpClient("http://127.0.0.1:8080/users/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
UserService.Iface client = new UserService.Client(protocol);
System.out.println(client.getByEmail("cedric.bodet@tngtech.com"));
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class TestModerationClient method main.
public static void main(String[] args) throws TException, IOException {
THttpClient thriftClient = new THttpClient("http://127.0.0.1:8080//moderation/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
ModerationService.Iface client = new ModerationService.Client(protocol);
List<ModerationRequest> requestsByModerator = client.getRequestsByModerator(new User().setId("").setEmail("cedric.bodet@tngtech.com").setDepartment("BB"));
System.out.println("Fetched " + requestsByModerator.size() + " moderation requests from moderation service");
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360ProjectService method getThriftProjectClient.
private ProjectService.Iface getThriftProjectClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/projects/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new ProjectService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360VendorService method getThriftVendorClient.
private VendorService.Iface getThriftVendorClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/vendors/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new VendorService.Client(protocol);
}
use of org.apache.thrift.protocol.TCompactProtocol in project sw360portal by sw360.
the class Sw360LicenseInfoService method getThriftLicenseInfoClient.
private LicenseInfoService.Iface getThriftLicenseInfoClient() throws TTransportException {
THttpClient thriftClient = new THttpClient(thriftServerUrl + "/licenseinfo/thrift");
TProtocol protocol = new TCompactProtocol(thriftClient);
return new LicenseInfoService.Client(protocol);
}
Aggregations