SlideShare a Scribd company logo
Mule ESB
By Srilatha Kante
Java Component
• The Java component enables the developer to
package custom Java code that executes when
the component receives a message. The Java
component can be used to enhance the
functionality and capability of your web-based
applications written in Java.
Java Component
• To configure the Java component, selecting
a class is the only required entry.
• The class is simply a collection of properties,
attributes and methods the component applies to
all messages
• In addition, this component allows you to
optionally configure Singleton (object factory
that creates an object instance)
and Spring (object factory used to obtain Spring
bean instances) object factories, which are
invoked when a message is received
Example
Start..
• In the package explorer right click on your
project and select New > Class
• Name your class, and make the
package org.mule.transformers
• You can use the basic class as a skeleton to
construct a simple Java Component:
Java Class Sample
• package com.mypackage;
• public class JavaComponentDemo {
• public String greetMe(String name){
• return name;
• }
• }
Exception
• Check for the Exception related to Callable
interface
• Callable is an interface which is provided by
mule for using the Java Component in flows
• Callable needs an overridden method called
onCall()
Usage of Callable Interface
• package com.mypackage;
• import org.mule.api.MuleEventContext;
• import org.mule.api.lifecycle.Callable;
• public class JavaComponentDemo implements Callable{
• @Override
• public Object onCall(MuleEventContext eventContext) throws Exception
{
• return "Hello ";
• }
• }
Ad

Recommended

Invoke component
Invoke component
Srilatha Kante
 
Java components in Mule
Java components in Mule
Madhuri Chitrala
 
Custom transformer and annotation
Custom transformer and annotation
Sunil Kumar
 
Java in mule part 1
Java in mule part 1
vasanthii9
 
Designing rest with raml part3
Designing rest with raml part3
Anirban Sen Chowdhary
 
Java Components and their applicability in Mule Anypoint Studio
Java Components and their applicability in Mule Anypoint Studio
VenkataNaveen Kumar
 
Inheritance1
Inheritance1
Daman Toor
 
Mule with velocity
Mule with velocity
Anirban Sen Chowdhary
 
Ms build – inline task
Ms build – inline task
LearningTech
 
Idempotent filter in mule
Idempotent filter in mule
Mohammed246
 
Getting anypoint studios all versions
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
Mule velocity
Mule velocity
Praneethchampion
 
Idempotent filter in Mule
Idempotent filter in Mule
F K
 
Using maven with mule
Using maven with mule
Sindhu VL
 
Initialize database in Mule part2
Initialize database in Mule part2
Anirban Sen Chowdhary
 
Servlet
Servlet
Rami Nayan
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1
Alex Fernandez
 
Mule management console installation with Tomcat
Mule management console installation with Tomcat
Sudha Ch
 
AngularJS Version 1.3
AngularJS Version 1.3
Nir Noy
 
Deploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule with drools
Mule with drools
F K
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
Son Nguyen
 
Mule esb domain
Mule esb domain
D.Rajesh Kumar
 
Mule message
Mule message
Marta Bryla
 
Mule_Portal
Mule_Portal
Srilatha Kante
 
Java-JSON-Jackson
Java-JSON-Jackson
Srilatha Kante
 
Mule advanced
Mule advanced
D.Rajesh Kumar
 
Mule Cloud Connectors-Save and Load OAuth
Mule Cloud Connectors-Save and Load OAuth
Sara Peralta
 
Web services
Web services
Srilatha Kante
 
Mule message structure and varibles scopes
Mule message structure and varibles scopes
Ramakrishna kapa
 

More Related Content

What's hot (14)

Ms build – inline task
Ms build – inline task
LearningTech
 
Idempotent filter in mule
Idempotent filter in mule
Mohammed246
 
Getting anypoint studios all versions
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
Mule velocity
Mule velocity
Praneethchampion
 
Idempotent filter in Mule
Idempotent filter in Mule
F K
 
Using maven with mule
Using maven with mule
Sindhu VL
 
Initialize database in Mule part2
Initialize database in Mule part2
Anirban Sen Chowdhary
 
Servlet
Servlet
Rami Nayan
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1
Alex Fernandez
 
Mule management console installation with Tomcat
Mule management console installation with Tomcat
Sudha Ch
 
AngularJS Version 1.3
AngularJS Version 1.3
Nir Noy
 
Deploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule with drools
Mule with drools
F K
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
Son Nguyen
 
Ms build – inline task
Ms build – inline task
LearningTech
 
Idempotent filter in mule
Idempotent filter in mule
Mohammed246
 
Getting anypoint studios all versions
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
Idempotent filter in Mule
Idempotent filter in Mule
F K
 
Using maven with mule
Using maven with mule
Sindhu VL
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1
Alex Fernandez
 
Mule management console installation with Tomcat
Mule management console installation with Tomcat
Sudha Ch
 
AngularJS Version 1.3
AngularJS Version 1.3
Nir Noy
 
Deploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule with drools
Mule with drools
F K
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
Son Nguyen
 

Viewers also liked (16)

Mule esb domain
Mule esb domain
D.Rajesh Kumar
 
Mule message
Mule message
Marta Bryla
 
Mule_Portal
Mule_Portal
Srilatha Kante
 
Java-JSON-Jackson
Java-JSON-Jackson
Srilatha Kante
 
Mule advanced
Mule advanced
D.Rajesh Kumar
 
Mule Cloud Connectors-Save and Load OAuth
Mule Cloud Connectors-Save and Load OAuth
Sara Peralta
 
Web services
Web services
Srilatha Kante
 
Mule message structure and varibles scopes
Mule message structure and varibles scopes
Ramakrishna kapa
 
MMC
MMC
Srilatha Kante
 
Connection management
Connection management
Srilatha Kante
 
Logger
Logger
Srilatha Kante
 
Anypoint platform security components
Anypoint platform security components
D.Rajesh Kumar
 
Mule message structure
Mule message structure
Srilatha Kante
 
Mule exception handlingstrategies
Mule exception handlingstrategies
D.Rajesh Kumar
 
Mule message structure
Mule message structure
Shanky Gupta
 
Connection management
Connection management
Srilatha Kante
 
Ad

Similar to Java component (20)

Simple Java component in Mule
Simple Java component in Mule
Christian Hipolito
 
Mule java part-1
Mule java part-1
Karnam Karthik
 
Mule java part-1
Mule java part-1
Karnam Karthik
 
Mule: Java Component
Mule: Java Component
Sulthony Hartanto
 
Mule java part-1
Mule java part-1
Ravinder Singh
 
Mule ESB
Mule ESB
Yura Nosenko
 
Invoke component demo in mule
Invoke component demo in mule
Ramakrishna kapa
 
Mule: Java Transformer
Mule: Java Transformer
Sulthony Hartanto
 
Java components in mule
Java components in mule
Harish43
 
Java component
Java component
krishashi
 
Mule esb
Mule esb
vishnukanthro45
 
Mule esb
Mule esb
charan teja R
 
Mule esb
Mule esb
Phaniu
 
Mule esb Basics
Mule esb Basics
Sunil Komarapu
 
Mule esb
Mule esb
Khasim Saheb
 
Mule esb
Mule esb
princeirfancivil
 
Mule esb
Mule esb
Phaniu
 
Mule esb
Mule esb
irfan1008
 
Mule esb
Mule esb
Anand kalla
 
Java
Java
manavp
 
Ad

Recently uploaded (20)

Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
Digital Transformation: Automating the Placement of Medical Interns
Digital Transformation: Automating the Placement of Medical Interns
Safe Software
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Top Time Tracking Solutions for Accountants
Top Time Tracking Solutions for Accountants
oliviareed320
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
declaration of Variables and constants.pptx
declaration of Variables and constants.pptx
meemee7378
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
Digital Transformation: Automating the Placement of Medical Interns
Digital Transformation: Automating the Placement of Medical Interns
Safe Software
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Top Time Tracking Solutions for Accountants
Top Time Tracking Solutions for Accountants
oliviareed320
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
declaration of Variables and constants.pptx
declaration of Variables and constants.pptx
meemee7378
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 

Java component

  • 2. Java Component • The Java component enables the developer to package custom Java code that executes when the component receives a message. The Java component can be used to enhance the functionality and capability of your web-based applications written in Java.
  • 3. Java Component • To configure the Java component, selecting a class is the only required entry. • The class is simply a collection of properties, attributes and methods the component applies to all messages • In addition, this component allows you to optionally configure Singleton (object factory that creates an object instance) and Spring (object factory used to obtain Spring bean instances) object factories, which are invoked when a message is received
  • 5. Start.. • In the package explorer right click on your project and select New > Class • Name your class, and make the package org.mule.transformers • You can use the basic class as a skeleton to construct a simple Java Component:
  • 6. Java Class Sample • package com.mypackage; • public class JavaComponentDemo { • public String greetMe(String name){ • return name; • } • }
  • 7. Exception • Check for the Exception related to Callable interface • Callable is an interface which is provided by mule for using the Java Component in flows • Callable needs an overridden method called onCall()
  • 8. Usage of Callable Interface • package com.mypackage; • import org.mule.api.MuleEventContext; • import org.mule.api.lifecycle.Callable; • public class JavaComponentDemo implements Callable{ • @Override • public Object onCall(MuleEventContext eventContext) throws Exception { • return "Hello "; • } • }