Created
May 17, 2011 12:21
-
-
Save mgenov/976374 to your computer and use it in GitHub Desktop.
Polling Async Services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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