Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{
    "uuid": "3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a",
    "zoneUuid": "3c9000a9-3eb6-41fe-a11b-5a5859020c65",
    "clientId": "8c9167a6-bb83-4f77-bdfc-1947a946f77b",
    "clientSecret": "de02e3fa-4b23-46cb-aed6-5665a16e73d3"
}


Configuring an Adaptor

On startup an adaptor consults a properties file for its configuration information. The file resides on the same system as the adaptor and the following is a list of the minimum properties needed by an adaptor. Consult the adaptors documentation for a defnitive definitive list and property names since they can change from adaptor to adaptor:

PropertyDescriptionExample Value
classNameTransport implementation class (should be a constant value if using the YOUnite Java SDK).com.younite.adaptor.sdk.transport.amq.AMQConnect
zoneUuidUUID of the zone this adaptor belongs to3c9000a9-3eb6-41fe-a11b-5a5859020c65
adaptorUuidUUID of the adaptor3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a
clientIdClientID returned from POST /adaptors used to connect to message broker8c9167a6-bb83-4f77-bdfc-1947a946f77b
clientSecretSecret returned from POST /adaptors used to connect to message brokerde02e3fa-4b23-46cb-aed6-5665a16e73d3
brokerUrlMessage Broker URLnio+ssl://message-broker-uri:61617
oauthServerUrlOAUTH Server to validate adaptor access credentials. YOUnite runs an embedded OAuth server which your implementation may be using. By default it  runs on port 8080 so, in this case the value would be http://ip-address-of-the-YOUnite-datahub:8080http://oauth-server-uri

Example:

Code Block
languagetext
# Configuration
# Transport implementation class
className: com.younite.adaptor.sdk.transport.amq.AMQConnect

# UUID of the zone this adaptor belongs to
zoneUuid: 6ab9380f-d7f2-477c-b93c-3a762e70095e

# Adaptor UUID
adaptorUuid: 3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a

# ClientID and Secret to be used by JMS to verify adaptor has valid access to message bus (and API)
clientId: 8c9167a6-bb83-4f77-bdfc-1947a946f77b
clientSecret: de02e3fa-4b23-46cb-aed6-5665a16e73d3

# Message Broker URL
brokerUrl: nio+ssl://192.2.200.25:61617

# OAUTH Server to validate adaptor access credentials
oauthServerUrl: http://192.2.200.15:8080


Adaptors States

Once an adaptor is added it is in the "Posted" state. The adaptors moves between states as follows:

...

StateDescription
PostedAdaptor is successfully POSTed. An API consumer can make this request or it can be done through the YOUnite UI.
Configured

The adaptors had a:

  • Successful connection to the YOUnite Datahub via the message bus/broker
  • Subscribed to the appropriate message broker topics
  • Its message broker queue has been created
PauseThe adaptors is running but not accepting adaptor (read/write) requests.

Play Read-Only

The adaptor is accepting read requests only.
PlayThe adaptor is accepting read and write requests.


Start the Adaptor - Connect to the Hub

...

An adaptor state can be changed using the request:

Code Block
languagejs
PUT /zones/zone-uuid/adaptors/adaptors-uuid

...

 Before making a request, the adaptor's changeVersion needs to be retrieved by peforming a GET on the adaptor:

Code Block
languagejs
GET /zones/3c9000a9-3eb6-41fe-a11b-5a5859020c65/adaptors/3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a

A response that includes the adaptor's changeVersion is returned:

...