SlideShare a Scribd company logo
1 of 24
BY
B.SAKTHIBALA
I.M.SC(CS)
DEFINITION
 RMI stands for Remote Method Invocation. It is a
mechanism that allows an object residing in one
system (JVM) to access/invoke an object running on
another JVM.
 RMI is used to build distributed applications; it
provides remote communication between Java
programs. It is provided in the package java.rmi
APPLICATION
Stub
skeleton
STUB:
The stub object on the client
machine builds an information block and
send.
Information to the server.
The block consists an identifier of the re
mote object to be used.
Method name which is to be invoked
Parameters to the remote JVM.
UNDERSTANDING STUB &SKELETON
 RMI uses stub and skeleton object for communication
with the remote object.
 A remote object is an object whose method can be
invoked from another JVM. Let's understand the stub
and skeleton objects
DIAGRAME
Architecture of RMI
CLIENT &SERVER
 In CIient server computing, the clients requests a
resource and the server provides that resource.
 A server may serve multiple client is in contact with
only one server.
 Both client and server usually communicate via a
computer network. but sometimes they may reside in
the same system.
STUB AND SKELETON IN RMI
 The STUB is the class that implements the remote
interface.
 It server as a client-side placeholder for the remote
object.
 The stub communicates with the server-side
SKELETON.
 The SKLETON is the STUB’s counterpart on Server-
side.
RRL(Remote reference layer)
RRL(Remote Reference Layer) :
 It is the layer which manages the
references made by the client to the
remote object.
TRANSPORT LAYER
 Transport Layer provides transparent transfer of data
between end users, providing reliable data transfer
services to the upper layers.
 The transport layer controls the reliability of a given
link through flow control, segmentation and
Desegmentation, and error control.
DIAGRAM
 six steps to write the RMI program
in java:
 Creation of remote interface .
 Provide the implementation of the remote interface.
 Compile the implementation class and create the stub
and skeleton objects using the rmi tool.
 Start the registry service by rmi registry tool .
 Write and start the remote application .
 Write and start the client application.
Step 1: Defining the remote interface:
The first thing to do is to create an interface which will
provide the description of the methods that can be
invoked by remote clients.
 This interface should extend the Remote interface and
the method prototype within the interface should
throw the Remote Exception.
// Creating a Search interface
 import java.rmi.*;
 public interface Search extends Remote
 {
 // Declaring the method prototype
 public String query(String search) throws RemoteException; }
 Step 2: Implementing the remote interface
 The next step is to implement the remote interface. To
implement the remote interface, the class should
extend to UnicastRemoteObject class of java.rmi
package. Also, a default constructor needs to be
created to throw the from its parent constructor in
class.
Step 3: Creating Stub and Skeleton objects from the
implementation class using rmic
The rmic tool is used to invoke the rmi compiler that
creates the Stub and Skeleton objects. Its prototype is
rmic classname.
For above program the following command need to be
executed at the command prompt
rmic SearchQuery.
 STEP 4: Start the rmiregistry
Start the registry service by issuing the following
command at the command prompt start rmiregistry
 STEP 5: Create and execute the server application
program
The next step is to create the server application
program and execute it on a separate command
prompt.
 //program for client application
 import java.rmi.*;
 public class ClientRequest
 {
 public static void main(String args[])
 {
 String answer,value="Reflection in Java";
 try
 {
 // lookup method to find reference of remote object
 Search access =
 (Search)Naming.lookup("rmi://localhost:1900"+
 "/geeksforgeeks");
 answer = access.query(value);
 System.out.println("Article on " + value +
 " " + answer+" at GeeksforGeeks");
 }
 catch(Exception ae) { system.out.println(ae);}}}
Compile all the java file
Start RMI registry
Program:
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.*;
public class Client { private Client() {}
public static void main(String[] args);
{
try {
// Getting the registry Registry registry =
LocateRegistry.getRegistry
// Looking up the registry for the remote object Hello stub = (Hello)
registry.lookup("Hello");
// Calling the remote method using the obtained object List<Student> list =
(List)stub.getStudents();
for (Student s:list)
{ //
System.out.println("bc "+s.getBranch());
System.out.println("ID: " + s.getId());
System.out.println("name: " + s.getName());
System.out.println("branch: " + s.getBranch());
System.out.println("percent: " + s.getPercent());
System.out.println("email: " + s.getEmail());
}
// System.out.println(list);
}
catch (Exception e) {
System.err.println("Client exception: " + e.toString()); e.printStackTrace();
} } }
Output:
THANKING YOU

More Related Content

What's hot

What's hot (20)

Java rmi
Java rmiJava rmi
Java rmi
 
Introduction To Rmi
Introduction To RmiIntroduction To Rmi
Introduction To Rmi
 
Rmi
RmiRmi
Rmi
 
Rmi ppt
Rmi pptRmi ppt
Rmi ppt
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
Java RMI
Java RMIJava RMI
Java RMI
 
RMI
RMIRMI
RMI
 
Java RMI(Remote Method Invocation)
Java RMI(Remote Method Invocation)Java RMI(Remote Method Invocation)
Java RMI(Remote Method Invocation)
 
Java rmi
Java rmiJava rmi
Java rmi
 
Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
 
Rmi presentation
Rmi presentationRmi presentation
Rmi presentation
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Java rmi tutorial
Java rmi tutorialJava rmi tutorial
Java rmi tutorial
 
Java RMI
Java RMIJava RMI
Java RMI
 
Java RMI Presentation
Java RMI PresentationJava RMI Presentation
Java RMI Presentation
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMI
 
Rmi ppt-2003
Rmi ppt-2003Rmi ppt-2003
Rmi ppt-2003
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
Remote Method Invocation (RMI)
Remote Method Invocation (RMI)Remote Method Invocation (RMI)
Remote Method Invocation (RMI)
 

Similar to Remote method invocatiom

Similar to Remote method invocatiom (20)

Rmi
RmiRmi
Rmi
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
ADB Lab Manual.docx
ADB Lab Manual.docxADB Lab Manual.docx
ADB Lab Manual.docx
 
RMI (Remote Method Invocation)
RMI (Remote Method Invocation)RMI (Remote Method Invocation)
RMI (Remote Method Invocation)
 
Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programming
 
Rmi
RmiRmi
Rmi
 
DS
DSDS
DS
 
Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMI
 
Distributed Objects and JAVA
Distributed Objects and JAVADistributed Objects and JAVA
Distributed Objects and JAVA
 
Oracle docs rmi applications
Oracle docs rmi applicationsOracle docs rmi applications
Oracle docs rmi applications
 
Rmi3
Rmi3Rmi3
Rmi3
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocation
 
Module 3 remote method invocation-2
Module 3   remote method  invocation-2Module 3   remote method  invocation-2
Module 3 remote method invocation-2
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 
17rmi
17rmi17rmi
17rmi
 
#4 (Remote Method Invocation)
#4 (Remote Method Invocation)#4 (Remote Method Invocation)
#4 (Remote Method Invocation)
 
Distributed objects
Distributed objectsDistributed objects
Distributed objects
 
Rmi
RmiRmi
Rmi
 
Java - Remote method invocation
Java - Remote method invocationJava - Remote method invocation
Java - Remote method invocation
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocation
 

More from sakthibalabalamuruga (14)

Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software engineering
Software  engineeringSoftware  engineering
Software engineering
 
web programming
web programmingweb programming
web programming
 
compiler design
compiler designcompiler design
compiler design
 
Bigdata
BigdataBigdata
Bigdata
 
Os
OsOs
Os
 
Apache mahout and R-mining complex dataobject
Apache mahout and R-mining complex dataobjectApache mahout and R-mining complex dataobject
Apache mahout and R-mining complex dataobject
 
Computer network
Computer networkComputer network
Computer network
 
Operating system
Operating systemOperating system
Operating system
 
Rdbms
RdbmsRdbms
Rdbms
 
Rdbms
RdbmsRdbms
Rdbms
 
Rdbms
RdbmsRdbms
Rdbms
 
Encoding
EncodingEncoding
Encoding
 
Data structure and algorithm
Data structure and algorithmData structure and algorithm
Data structure and algorithm
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Remote method invocatiom

  • 2. DEFINITION  RMI stands for Remote Method Invocation. It is a mechanism that allows an object residing in one system (JVM) to access/invoke an object running on another JVM.  RMI is used to build distributed applications; it provides remote communication between Java programs. It is provided in the package java.rmi
  • 4. STUB: The stub object on the client machine builds an information block and send. Information to the server. The block consists an identifier of the re mote object to be used. Method name which is to be invoked Parameters to the remote JVM.
  • 5. UNDERSTANDING STUB &SKELETON  RMI uses stub and skeleton object for communication with the remote object.  A remote object is an object whose method can be invoked from another JVM. Let's understand the stub and skeleton objects
  • 8. CLIENT &SERVER  In CIient server computing, the clients requests a resource and the server provides that resource.  A server may serve multiple client is in contact with only one server.  Both client and server usually communicate via a computer network. but sometimes they may reside in the same system.
  • 9. STUB AND SKELETON IN RMI  The STUB is the class that implements the remote interface.  It server as a client-side placeholder for the remote object.  The stub communicates with the server-side SKELETON.  The SKLETON is the STUB’s counterpart on Server- side.
  • 10. RRL(Remote reference layer) RRL(Remote Reference Layer) :  It is the layer which manages the references made by the client to the remote object.
  • 11. TRANSPORT LAYER  Transport Layer provides transparent transfer of data between end users, providing reliable data transfer services to the upper layers.  The transport layer controls the reliability of a given link through flow control, segmentation and Desegmentation, and error control.
  • 13.  six steps to write the RMI program in java:  Creation of remote interface .  Provide the implementation of the remote interface.  Compile the implementation class and create the stub and skeleton objects using the rmi tool.  Start the registry service by rmi registry tool .  Write and start the remote application .  Write and start the client application.
  • 14. Step 1: Defining the remote interface: The first thing to do is to create an interface which will provide the description of the methods that can be invoked by remote clients.  This interface should extend the Remote interface and the method prototype within the interface should throw the Remote Exception. // Creating a Search interface  import java.rmi.*;  public interface Search extends Remote  {  // Declaring the method prototype  public String query(String search) throws RemoteException; }
  • 15.  Step 2: Implementing the remote interface  The next step is to implement the remote interface. To implement the remote interface, the class should extend to UnicastRemoteObject class of java.rmi package. Also, a default constructor needs to be created to throw the from its parent constructor in class.
  • 16. Step 3: Creating Stub and Skeleton objects from the implementation class using rmic The rmic tool is used to invoke the rmi compiler that creates the Stub and Skeleton objects. Its prototype is rmic classname. For above program the following command need to be executed at the command prompt rmic SearchQuery.
  • 17.  STEP 4: Start the rmiregistry Start the registry service by issuing the following command at the command prompt start rmiregistry  STEP 5: Create and execute the server application program The next step is to create the server application program and execute it on a separate command prompt.
  • 18.  //program for client application  import java.rmi.*;  public class ClientRequest  {  public static void main(String args[])  {  String answer,value="Reflection in Java";  try  {  // lookup method to find reference of remote object  Search access =  (Search)Naming.lookup("rmi://localhost:1900"+  "/geeksforgeeks");  answer = access.query(value);  System.out.println("Article on " + value +  " " + answer+" at GeeksforGeeks");  }  catch(Exception ae) { system.out.println(ae);}}}
  • 19. Compile all the java file
  • 21. Program: import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.util.*; public class Client { private Client() {} public static void main(String[] args); { try { // Getting the registry Registry registry = LocateRegistry.getRegistry
  • 22. // Looking up the registry for the remote object Hello stub = (Hello) registry.lookup("Hello"); // Calling the remote method using the obtained object List<Student> list = (List)stub.getStudents(); for (Student s:list) { // System.out.println("bc "+s.getBranch()); System.out.println("ID: " + s.getId()); System.out.println("name: " + s.getName()); System.out.println("branch: " + s.getBranch()); System.out.println("percent: " + s.getPercent()); System.out.println("email: " + s.getEmail()); } // System.out.println(list); } catch (Exception e) { System.err.println("Client exception: " + e.toString()); e.printStackTrace(); } } }