Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

6.2. Component Contracts

download PDF
Component Contract can be either a Component Service or a Component Reference. A Component Service is used to expose the functionality of an implementation as a service. A Component Reference allows a component to consume other services. A component contract can be defined in three different ways in SwitchYard:
  • Java: Using a Java interface.
  • WSDL: Using a port type in a WSDL file.
  • ESB: Using a virtual interface definition. (No real file is used).
A component contract in SwitchYard has the following characteristics. All are optional:
  • argument: If used, this is the message content. It is optional as there can be operations that don’t expect a message (for example, REST GET, Scheduled operations​). Used in Exchanges of type IN_ONLY and IN_OUT.
  • return type: If used, this is the message content for the response. Used only in Exchanges of type IN_OUT.
  • exceptions: If used, this is the message content for the response in case of an Exception. Used in Exchanges of type IN_ONLY and IN_OUT.
Note
Contracts in Camel can be defined with empty parameters, and users can still work with the message content.

Java contract

A Java contract is defined by a Java Interface.

Note
Java components require Java contracts.

WSDL contract

A WSDL contract is defined by a port type in a WSDL file.

ESB contract

An ESB contract is a virtual contract (no file required) that declares the types of the input, output and exception types.

Note
ESB contract may be used in components with one single operation.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.