The pages covers what a developer needs to know to develop am adaptor. using the YOUnite SDK for Adaptors.
For more information on YOUnite adaptors see:
- TheĀ Introduction to YOUnite covers the core concepts of how YOUnite implements federated MDM with adaptors.
- The Adaptors page gives more detail on how adaptors work and how they are created and managed.
Where to Find the Java Artifacts
Adaptor Design
Adaptor Components
Adaptor Lifecycle
- Adaptor registration: POST on API to register (create) an adaptor.
Adaptor start up: When an Adaptor process comes up, as part of the handshake, it sends an Adaptor ready message to the router. For example:
// Create MessageServiceConfiguration builder to // build MessageServiceConfiguration and use it to get MessageService instance. // Use MessageService for interaction with router via message bus. MessageServiceConfiguration.Builder builder = MessageServiceConfiguration.newConfiguration(); MessageServiceConfiguration msConf = builder.setBrokerUrl("nio+ssl://docker.local:61617"). setJmsClientId(jmsClientId).build(); try { MessageService messageService = MessageServiceFactory.getMessageService(msConf); messageService.setListener(Constants.MessageType.OPS, adminListener); // Listener for OPS messages messageService.setListener(Constants.MessageType.DATA, dataListener); // Listener for Data messages // Create AdaptorUp object for conveying the bootstrap information regarding this adaptor AdaptorUp adaptorUp = new AdaptorUp(); adaptorUp.setStatus("RUNNING"); Map<String, String> capabilities = new HashMap<>(); // Add Capabilities List adaptorUp.setCapabilities(capabilities); ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); String upMessage = objectMapper.writeValueAsString(adaptorUp); // Send an OPS message to the router via the Message Broker messageService.sendMessage(Constants.MessageType.OPS, upMessage); // Send Adaptor Up on OPS channel. } catch {...} // If everything goes fine, then the adminListener is notified by the router as it announces the initial state of this Adaptor. // If there is a problem, then the dataListener is notified of the error message.