The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter details the communication between the client library and the RDU and describes on how to establish, maintain, and close the connection between the client library and the RDU.
This chapter has the following sections:
The Cisco BAC API communicates with the RDU in a Cisco BAC deployment over TCP/IP.
The API client library initiates the connection between the API and the RDU. The RDU does not try to establish a connection between itself and the API.
Though the client library initiates and establishes connectivity between the API and the RDU, information flows in both directions, with the client library submitting requests to the RDU, and the RDU responding to those requests. The bilateral heartbeat messages enable the API client and the RDU to maintain a bidirectional connection.
Note The network administrator must ensure that:
•IP connectivity exists between the client and the RDU.
•The TCP port that the RDU listens on is opened through a firewall between the client API and the RDU. The default TCP port that the RDU listens on is 49187. The RDU uses this TCP port to bind itself to all network interfaces.
The client establishes a connection with the RDU by passing the following parameters:
•Hostname of the RDU; for example, rdu.mso.com
•Port for communication with the RDU; the default port is 49187.
•Administrator username; the default administrator username is bacadmin.
•Administrator password; the default administrator password is changeme.
You can use the following code to establish a connection between the RDU and the client library:
final PACEConnection connection =
PACEConnectionFactory.newInstance(
"rdu.mso.com", 49187, "bacadmin", "changeme");
The connection between the client library and RDU is maintained until it is explicitly closed. See Closing a Connection on how to close a connection.
The client library automatically maintains the connection between the client and RDU. In case the connection breaks in the network layer because of congestion, routing problems, or other issues, the client library automatically reconnects to the RDU. The client library tries to reconnect to the RDU until the connectivity is restored.
The reconnection process is automatic and does not impact your code while the RDU interacts with the library. For example, a synchronous call to submit a batch blocks the thread and returns the results when the results are available as usual; even if the client library had to automatically reconnect to the RDU.
The client library maintains a single TCP connection to the RDU. This connection can be used for any number of requests and responses. Multiple threads can use the same single connection object.
While there is only a single underlying TCP connection, many Provisioning API Command Engine (PACE) connection instances can be created. If there is a need for multiple BAC users in a single client, then multiple PACE connections are required.
The connection between the RDU and the client library is maintained until you explicitly close the connection. You can use the following code to close the connection:
connection.releaseConnection();