Skip to content

Instantly share code, notes, and snippets.

@mgenov
Created May 17, 2011 12:21
Show Gist options
  • Select an option

  • Save mgenov/976374 to your computer and use it in GitHub Desktop.

Select an option

Save mgenov/976374 to your computer and use it in GitHub Desktop.
Polling Async Services
public class PollingProvisioningServicePortType implements ProvisioningServicePortType {
private final ProvisioningServicePortType service;
public PollingProvisioningServicePortType(ProvisioningServicePortType service) {
this.service = service;
}
public String activateCustomer(final String cust_id) throws RemoteException {
return Polling.poll(new Poll<String>() {
public String execute() throws RemoteException{
return service.activateCustomer(cust_id);
}
});
}
public String addPackage(final String cust_id, final String package_id, final String serv_id) throws RemoteException {
return Polling.poll(new Poll<String>() {
public String execute() throws Exception {
return service.addPackage(cust_id,package_id,serv_id);
}
});
}
public String addSTB(final String cust_id, final String stb_mac, final String stb_sn, final String pin, final String stb_ip) throws RemoteException {
return Polling.poll(new Poll<String>() {
public String execute() throws Exception {
return service.addSTB(cust_id, stb_mac, stb_sn, pin, stb_ip);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment