+++ /dev/null
-/*******************************************************************************\r
- * ============LICENSE_START====================================================\r
- * * org.onap.aaf\r
- * * ===========================================================================\r
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * * ===========================================================================\r
- * * Licensed under the Apache License, Version 2.0 (the "License");\r
- * * you may not use this file except in compliance with the License.\r
- * * You may obtain a copy of the License at\r
- * * \r
- * * http://www.apache.org/licenses/LICENSE-2.0\r
- * * \r
- * * Unless required by applicable law or agreed to in writing, software\r
- * * distributed under the License is distributed on an "AS IS" BASIS,\r
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * * See the License for the specific language governing permissions and\r
- * * limitations under the License.\r
- * * ============LICENSE_END====================================================\r
- * *\r
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
- * *\r
- ******************************************************************************/\r
-package org.onap.aaf.example;\r
-\r
-import java.net.HttpURLConnection;\r
-import java.net.URI;\r
-\r
-import org.onap.aaf.cadi.Access;\r
-import org.onap.aaf.cadi.PropAccess;\r
-import org.onap.aaf.cadi.client.Future;\r
-import org.onap.aaf.cadi.config.SecurityInfoC;\r
-import org.onap.aaf.cadi.http.HClient;\r
-import org.onap.aaf.cadi.http.HX509SS;\r
-\r
-public class JU_CadiTest {\r
- public static void main(String args[]) {\r
- Access access = new PropAccess();\r
- try {\r
- SecurityInfoC<HttpURLConnection> si = new SecurityInfoC<HttpURLConnection>(access);\r
- HClient hclient = new HClient(\r
- new HX509SS(si),\r
- new URI("https://mithrilcsp.sbc.com:8085"),3000);\r
- hclient.setMethod("OPTIONS");\r
- hclient.setPathInfo("/gui/cadi/log/toggle/INFO");\r
- hclient.send();\r
- Future<String> future = hclient.futureReadString();\r
- if(future.get(5000)) {\r
- System.out.println(future.value);\r
- } else {\r
- System.out.printf("Error: %d-%s", future.code(),future.body());\r
- }\r
- \r
- } catch (Exception e) {\r
- e.printStackTrace();\r
- }\r
-\r
- }\r
-}\r