SlideShare a Scribd company logo
JAVA-MULE
GSN-K
Java Custom Component
• Java components are used write our custom code and custom
transformation. java transformers will be used when we cannot
transform a message using available Mule transformers. In this
example, following components are explained.
• Java Component
• Java component with singleton
• Invoke Component
• Java Transformer
• Reflection Entry Point Resolver
• Annotated Entry Point Resolver
• Invoking a service using java component
Below is the main flow which exposes a HTTP service and
refers to multiple sub flows one after another to cover all above
concepts.
Java Component:
Java component is used to refer a class which has complex code.
Example:
Below is sub flow named 'simple-java-component' which has Set
Payload and java component.
'Set Payload' component sets payload as "Custom Payload".
• Java component is reffered to custom made class
(UsingCallable) which implements Callable interface. This class is used
to print current payload, size of inbound properties and size of
invocation properties.
Above class implements Callable interface. it has
onCall(MuleEventContext eventContext) overriden method. This method
provides MuleEventContext . We can get all the data using MuleContext
instace as shown in above code snippet.Data-Mapper.
Java Component with Singleton:
The singleton object factory does not create a new instance for each
request; instead, the instance is shared.
Example:
Drag java component and double click on the java component to
bring up properties.
Click "+" symbol next to the 'Object' field
Select “core:singleton-object” and click "next".
Click on "..." button and select class
"com.techm.javacustomcomponents.UsingSingletonObject"
• Click on "Advanced" tab and create following three properties using "+"
as shown below and click on Finish.
• name
• dept
• location
Same properties with same names need to be created along with
setters and getters in "UsingSingletonObject" class. So that, specified
properties values in java component are assigned into java class
properties. Below is the code to create map object with these three
properties.
• A bean needs to be created in global elements to use Invoke
component. Create a bean which refers to a custom made java class
in global elements. In "Global Elements" tab click on "Create" button.
• Click on "..." symbol next to "Class" field to select a java custom made
class. Provide some meaningful names in "ID" and "Name" fields. Click
on OK button.
• Drag a invoke component and double click on the component to bring
up the properties. Fill the required fields as shown below.
• Name Any meaningful name
• Object Ref "ID" value of bean which is created earlier
• Method Method name which needs to be invoked
• Method Arguments Values of method arguments
• In the same way two more invoke components are created for
two methods (substract and multiply)
•Thank You All

More Related Content

What's hot

Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in mule
Mohammed246
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
Rupesh Sinha
 
Junit in mule demo
Junit in mule demoJunit in mule demo
Junit in mule demo
Sudha Ch
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
Khan625
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with mule
Sindhu VL
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
Ankush Sharma
 
Mule velocity
Mule velocityMule velocity
Mule velocity
Praneethchampion
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
Anirban Sen Chowdhary
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
Mohammed246
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
Praneethchampion
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
F K
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
Karnam Karthik
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
Praneethchampion
 
Mule properties
Mule propertiesMule properties
Mule properties
Ravinder Singh
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement modeAnypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
Son Nguyen
 
Mule - HTTP Listener
Mule - HTTP ListenerMule - HTTP Listener
Mule - HTTP Listener
Ankush Sharma
 
Propertiesinmule
PropertiesinmulePropertiesinmule
Propertiesinmule
Christian Hipolito
 

What's hot (19)

Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in mule
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
 
Junit in mule demo
Junit in mule demoJunit in mule demo
Junit in mule demo
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with mule
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Mule testing
Mule   testingMule   testing
Mule testing
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement modeAnypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
 
Mule - HTTP Listener
Mule - HTTP ListenerMule - HTTP Listener
Mule - HTTP Listener
 
Propertiesinmule
PropertiesinmulePropertiesinmule
Propertiesinmule
 

Similar to Java mule

Java
JavaJava
Java
manavp
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
Karnam Karthik
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
Karnam Karthik
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
Ravinder Singh
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
Ravinder Singh
 
Java in mule part 2
Java in mule part 2Java in mule part 2
Java in mule part 2
vasanthii9
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1
Salesforce Developers
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
Ivano Malavolta
 
object oriented programming language.pptx
object oriented programming language.pptxobject oriented programming language.pptx
object oriented programming language.pptx
syedabbas594247
 
Java component
Java componentJava component
Java component
krishashi
 
Java component
Java componentJava component
Java component
Srilatha Kante
 
Advanced oops concept using asp
Advanced oops concept using aspAdvanced oops concept using asp
Advanced oops concept using asp
shenbagavallijanarth
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
Thecreating Experts
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
Fundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdfFundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdf
StephieJohn
 
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To  Classes, Objects, & StringsIntro To C++ - Class 05 - Introduction To  Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Blue Elephant Consulting
 
Understanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG JuneUnderstanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG June
Deepu S Nath
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
katarichallenge
 
WEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScriptWEB TECHNOLOGIES JavaScript
Oop Constructor Destructors Constructor Overloading lecture 2
Oop Constructor  Destructors Constructor Overloading lecture 2Oop Constructor  Destructors Constructor Overloading lecture 2
Oop Constructor Destructors Constructor Overloading lecture 2
Abbas Ajmal
 

Similar to Java mule (20)

Java
JavaJava
Java
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Java in mule part 2
Java in mule part 2Java in mule part 2
Java in mule part 2
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
object oriented programming language.pptx
object oriented programming language.pptxobject oriented programming language.pptx
object oriented programming language.pptx
 
Java component
Java componentJava component
Java component
 
Java component
Java componentJava component
Java component
 
Advanced oops concept using asp
Advanced oops concept using aspAdvanced oops concept using asp
Advanced oops concept using asp
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Fundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdfFundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdf
 
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To  Classes, Objects, & StringsIntro To C++ - Class 05 - Introduction To  Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
 
Understanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG JuneUnderstanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG June
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
 
WEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScriptWEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScript
 
Oop Constructor Destructors Constructor Overloading lecture 2
Oop Constructor  Destructors Constructor Overloading lecture 2Oop Constructor  Destructors Constructor Overloading lecture 2
Oop Constructor Destructors Constructor Overloading lecture 2
 

More from Gandham38

Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filters
Gandham38
 
Mule splitters
Mule splittersMule splitters
Mule splitters
Gandham38
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
Gandham38
 
Mule properties
Mule propertiesMule properties
Mule properties
Gandham38
 
Mule batch
Mule batchMule batch
Mule batch
Gandham38
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
Gandham38
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
Gandham38
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component
Gandham38
 

More from Gandham38 (8)

Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filters
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule batch
Mule batchMule batch
Mule batch
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component
 

Recently uploaded

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 

Recently uploaded (20)

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 

Java mule

  • 2. Java Custom Component • Java components are used write our custom code and custom transformation. java transformers will be used when we cannot transform a message using available Mule transformers. In this example, following components are explained. • Java Component • Java component with singleton • Invoke Component • Java Transformer
  • 3. • Reflection Entry Point Resolver • Annotated Entry Point Resolver • Invoking a service using java component Below is the main flow which exposes a HTTP service and refers to multiple sub flows one after another to cover all above concepts.
  • 4. Java Component: Java component is used to refer a class which has complex code. Example: Below is sub flow named 'simple-java-component' which has Set Payload and java component. 'Set Payload' component sets payload as "Custom Payload".
  • 5. • Java component is reffered to custom made class (UsingCallable) which implements Callable interface. This class is used to print current payload, size of inbound properties and size of invocation properties.
  • 6. Above class implements Callable interface. it has onCall(MuleEventContext eventContext) overriden method. This method provides MuleEventContext . We can get all the data using MuleContext instace as shown in above code snippet.Data-Mapper.
  • 7. Java Component with Singleton: The singleton object factory does not create a new instance for each request; instead, the instance is shared. Example: Drag java component and double click on the java component to bring up properties. Click "+" symbol next to the 'Object' field Select “core:singleton-object” and click "next".
  • 8. Click on "..." button and select class "com.techm.javacustomcomponents.UsingSingletonObject"
  • 9. • Click on "Advanced" tab and create following three properties using "+" as shown below and click on Finish. • name • dept • location Same properties with same names need to be created along with setters and getters in "UsingSingletonObject" class. So that, specified properties values in java component are assigned into java class properties. Below is the code to create map object with these three properties.
  • 10.
  • 11.
  • 12.
  • 13. • A bean needs to be created in global elements to use Invoke component. Create a bean which refers to a custom made java class in global elements. In "Global Elements" tab click on "Create" button. • Click on "..." symbol next to "Class" field to select a java custom made class. Provide some meaningful names in "ID" and "Name" fields. Click on OK button.
  • 14. • Drag a invoke component and double click on the component to bring up the properties. Fill the required fields as shown below.
  • 15.
  • 16. • Name Any meaningful name • Object Ref "ID" value of bean which is created earlier • Method Method name which needs to be invoked • Method Arguments Values of method arguments • In the same way two more invoke components are created for two methods (substract and multiply)