-.. _appc_client_library:
-
-==================================================
-Application Controller (APPC) Client Library Guide
-==================================================
+.. ============LICENSE_START==========================================
+.. ===================================================================
+.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+.. ===================================================================
+.. Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+.. you may not use this documentation except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. https://creativecommons.org/licenses/by/4.0/
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+.. ============LICENSE_END============================================
+.. _appc_client_library:
-Revision History
-================
+=========================
+APPC Client Library Guide
+=========================
-+--------------+------------+---------------+--------------------------------------------------+
-| Date | Revision | Author | Changes |
-+--------------+------------+---------------+--------------------------------------------------+
-| 2017-08-22 | 1.0.0 | Paul Miller | First draft |
-+--------------+------------+---------------+--------------------------------------------------+
Introduction
============
Related Documentation
---------------------
-For additional information, see
+For additional information, see
- :ref:`appc_api_guide`
+ :ref:`appc_api_guide`
Client Library Background
About the Client Library
------------------------
-The APPC client library provides consumers of APPC capabilities with a strongly-typed Java interface and encapsulates the actual interaction with the APPC component over an asynchronous messaging channel such as UEB.
+The APPC client library provides consumers of APPC capabilities with a strongly-typed Java interface and encapsulates the actual interaction with the APPC component over an asynchronous messaging channel such as DMaaP.
Consumer Logic
--------------
Asynchronous Flow
^^^^^^^^^^^^^^^^^
-- The APPC Client Library is called using an asynchronous API using a full command object, which is mapped to a JSON representation.
-- The APPC client calls the UEB client and sends the JSON command to a configured topic.
+- The APPC Client Library is called using an asynchronous API utilizing a full command object, which is mapped to a JSON representation.
+- The APPC client calls the DMaaP client and sends the JSON command to a configured topic.
- The APPC client pulls response messages from the configured topic.
- On receiving the response for the command, the APPC client runs the relevant callback method of the consumer ResponseHandler.
^^^^^^^^^^^^^^^^
- The APPC Client Library is called using a synchronous API using a full command object, which is mapped to a JSON representation.
-- The APPC client calls the UEB client and sends the JSON command to a configured topic.
+- The APPC client calls the DMaaP client and sends the JSON command to a configured topic.
- The APPC client pulls response messages from the configured topic.
- On receiving the **final** response for the command, the APPC client returns the response object with a final status.
Client Library Usage
====================
-
+
Jar Files
---------
The Java application that runs the APPC client kit uses the following jar files:
- - com.att.appc.client.client-kit
- - com.att.appc.client.client-lib
+ - org.onap.appc.client:client-kit
+ - org.onap.appc.client:client-lib
-The client library JAR files are located in the repository under ``com\\att\\appc\\client``.
+The client library JAR files are located in the repository under ``com\att\appc\client``.
-Initialization
+Initialization
--------------
Initialize the client by calling the following method:
- "poolMembers"
- “client.response.timeout”
- “client.graceful.shutdown.timeout”
+ - “controllerType”
Shutdown
--------
-Shutdown the client by calling the following method:
+Shutdown the client by calling the following method, first if Controller Type is not included, the second when Controller Type is included:
-``void shutdownLifeCycleManager(boolean isForceShutdown)``
+``void shutdownLifeCycleManager(boolean isForceShutdown)``, or
+``void shutdownLifeCycleManager(boolean isForceShutdown, String controllerType)``
If the ``isForceShutdown`` flag is set to false, the client shuts down as soon as all responses for pending requests are received, or upon configurable timeout. (``client.graceful.shutdown.timeout``).
LifeCycleManagerStateful Interface
----------------------------------
-Generated from the APPC Yang model, this interface defines the services and request/response requirements for the ECOMP APPC component. For example, for LCM Command Audit, the following is defined:
+Generated from the APPC Yang model, this interface defines the services and request/response requirements for the ONAP APPC component. For example, for LCM Command Audit, the following is defined:
``@RPC(name="audit", outputType=AuditOutput.class)``
This defines the services and request/response requirements for the APPC component.
-Methods
---------
+Methods
+-------
The methods should match the actions described in the LCM API Guide. For each method:
.. |image0| image:: image2.png
:width: 5.60495in
:height: 4.55272in
+