2 * Copyright 2015 Samsung Electronics All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.oic.simulator.clientcontroller.test;
19 import java.util.concurrent.CountDownLatch;
21 import org.oic.simulator.clientcontroller.IVerificationListener;
24 * This class implements listeners for getting verification
27 public class VerifyListener implements IVerificationListener
30 private CountDownLatch lockObject;
31 private VerifyListenerObject verifyListenerObject;
33 public VerifyListener(CountDownLatch lockObject, VerifyListenerObject verifyListenerObject)
35 this.lockObject = lockObject;
36 this.verifyListenerObject = verifyListenerObject;
40 public void onVerificationStarted(String uId, int id)
42 verifyListenerObject.setId(id);
43 verifyListenerObject.setuId(uId);
44 verifyListenerObject.setWhichOne("started");
46 lockObject.countDown();
50 public void onVerificationAborted(String uId, int id)
52 verifyListenerObject.setId(id);
53 verifyListenerObject.setuId(uId);
54 verifyListenerObject.setWhichOne("aborted");
56 lockObject.countDown();
60 public void onVerificationCompleted(String uId, int id)
62 verifyListenerObject.setId(id);
63 verifyListenerObject.setuId(uId);
64 verifyListenerObject.setWhichOne("completed");
66 lockObject.countDown();