1 package org.oic.simulator.clientcontroller.test;
3 import java.util.concurrent.CountDownLatch;
5 import org.oic.simulator.SimulatorResourceModel;
6 import org.oic.simulator.clientcontroller.IPostListener;
8 public class PostListener implements IPostListener
11 private CountDownLatch lockObject;
12 private ListenerObject getListenerObject;
14 public PostListener(CountDownLatch lockObject, ListenerObject getListenerObject)
16 this.lockObject = lockObject;
17 this.getListenerObject = getListenerObject;
21 public void onPostCompleted(String uId, SimulatorResourceModel representation)
23 getListenerObject.setuId(uId);
24 getListenerObject.setRepresentation(representation);
26 lockObject.countDown();
30 public void onPostFailed(Throwable ex)
32 getListenerObject.setEx(ex);
34 lockObject.countDown();