SlideShare a Scribd company logo
Riza Muhammad Nurman 4SC
Click to edit Master title style
SESI 6
on
4SC Q7
SESI 6
on
4SC Q7
FACULTYFACULTY
Riza Muhammad NurmanRiza Muhammad Nurman
Implementing RMI Server & ClientImplementing RMI Server & Client
Facebook : https://facebook.com/rizamanFacebook : https://facebook.com/rizaman
Twitter : https://twitter.com/rhyzoneTwitter : https://twitter.com/rhyzone
SlideShare : https://slideshare.net/rizamanSlideShare : https://slideshare.net/rizaman
Riza Muhammad Nurman 4SC
Click to edit Master title styleContent
• Membuat RMI Server
• Membuat RMI Client
Riza Muhammad Nurman 4SC
Click to edit Master title styleCara Kerja
SERVER
CLIENT
Riza Muhammad Nurman 4SC
Click to edit Master title styleKonfigurasi RMI Server Apps
• Buat Koneksi
– Package : config
– Class : Koneksi
• Buat Object Remote
– Package : object
– Interface : IFaculty
• Buat model
– Package : model
– Class : Faculty
• Buat Main Class
Riza Muhammad Nurman 4SC
Click to edit Master title styleInterface IFaculty
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
public interface IFaculty extends Remote{
public String getFac_code() throws RemoteException;
public void setFac_code(String fac_code)throws RemoteException;
public String getFac_name() throws RemoteException;
public void setFac_name(String fac_name) throws RemoteException;
public String getFac_email() throws RemoteException;
public void setFac_email(String fac_email) throws RemoteException;
public String getFac_phone() throws RemoteException;
public void setFac_phone(String fac_phone) throws RemoteException;;
public int doInsert() throws RemoteException;
public ArrayList display() throws RemoteException;
public ArrayList getRecord() throws RemoteException;
public int doUpdate() throws RemoteException;
public int doDelete() throws RemoteException;
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleClass Faculty
import config.Koneksi;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import object.IFaculty;
public class Faculty extends UnicastRemoteObject implements IFaculty{
private String fac_code, fac_name, fac_email, fac_phone;
private Koneksi obj_koneksi = new Koneksi();
public Faculty() throws RemoteException {
super();
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleMain Class
public class Main {
public static void main(String[] args) {
try {
Registry registry = LocateRegistry.createRegistry(1099);
IFaculty obj = new Faculty();
registry.rebind("log", obj);
System.out.println("Object is registered.");
System.out.println("Now server is waiting for client request...");
}
catch(RemoteException e) {
System.out.println("FileServer: " + e);
}
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleKonfigurasi RMI Client Apps
• Buat Object Remote
– Package : object
– Interface : IFaculty
• Buat tampilan aplikasi
– Package : view
– Class : VMenu, VFacultyList, VFacultyForm
• Buat folder images
– Package : images
– Tidak ada class cuma gambar
Isi Interface dan nama
package pada Object Remote
RMI Client harus sama
dengan RMI Server!
Riza Muhammad Nurman 4SC
Click to edit Master title styleVFacultyForm
Riza Muhammad Nurman 4SC
Click to edit Master title styleVFacultyForm - 2
public VFacultyForm() {
initComponents();
btn_delete.setEnabled(false);
btn_update.setEnabled(false);
try {
Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099);
obj = (IFaculty) myRegistry.lookup("log");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error: " + e);
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleVFacultyForm - 3
public VFacultyForm(String id) {
initComponents();
btn_save.setEnabled(false);
try {
Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099);
obj = (IFaculty) myRegistry.lookup("log");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error: " + e);
}
this.getRecord(id);
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleVFacultyList
Riza Muhammad Nurman 4SC
Click to edit Master title styleVFacultyList - 2
public VFacultyList() {
initComponents();
try {
Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099);
obj = (IFaculty) myRegistry.lookup("log");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error: " + e);
}
displayData();
}
Riza Muhammad Nurman 4SC
Click to edit Master title style

More Related Content

Similar to Sesi 6 4SC

Exploring the Java Servlet Technology
Exploring the Java Servlet TechnologyExploring the Java Servlet Technology
Exploring the Java Servlet Technology
Riza Nurman
 
L07 Frameworks
L07 FrameworksL07 Frameworks
L07 Frameworks
Ólafur Andri Ragnarsson
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjan
php2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabad
php2ranjan
 
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
NETWAYS
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
Jenkins NS
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
Darren Craig
 
Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in WebserverHowto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Master Zend Framework
 
Sap ep
Sap epSap ep
Sap ep
sapepit
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
WO Community
 
IBM WebSphere Process Server Training.pdf
IBM WebSphere Process Server Training.pdfIBM WebSphere Process Server Training.pdf
IBM WebSphere Process Server Training.pdf
SpiritsoftsTraining
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
Summer Lu
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
Nerd Tzanetopoulos
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
Eric Overfield
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Edureka!
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
Comunidade Portuguesa de SharePoiint
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Tech OneStop
 
ADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet CommunicationADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet Communication
Riza Nurman
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Chalermpon Areepong
 
4SCQ7M1 Last session
4SCQ7M1 Last session4SCQ7M1 Last session
4SCQ7M1 Last session
Riza Nurman
 

Similar to Sesi 6 4SC (20)

Exploring the Java Servlet Technology
Exploring the Java Servlet TechnologyExploring the Java Servlet Technology
Exploring the Java Servlet Technology
 
L07 Frameworks
L07 FrameworksL07 Frameworks
L07 Frameworks
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabad
 
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in WebserverHowto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
 
Sap ep
Sap epSap ep
Sap ep
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
 
IBM WebSphere Process Server Training.pdf
IBM WebSphere Process Server Training.pdfIBM WebSphere Process Server Training.pdf
IBM WebSphere Process Server Training.pdf
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
 
ADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet CommunicationADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet Communication
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
 
4SCQ7M1 Last session
4SCQ7M1 Last session4SCQ7M1 Last session
4SCQ7M1 Last session
 

More from Riza Nurman

TOT PHP DAY 1
TOT PHP DAY 1TOT PHP DAY 1
TOT PHP DAY 1
Riza Nurman
 
SE - Chapter 9 Pemeliharaan Perangkat Lunak
SE - Chapter 9 Pemeliharaan Perangkat LunakSE - Chapter 9 Pemeliharaan Perangkat Lunak
SE - Chapter 9 Pemeliharaan Perangkat Lunak
Riza Nurman
 
SE - Chapter 8 Strategi Pengujian Perangkat Lunak
SE - Chapter 8 Strategi Pengujian Perangkat LunakSE - Chapter 8 Strategi Pengujian Perangkat Lunak
SE - Chapter 8 Strategi Pengujian Perangkat Lunak
Riza Nurman
 
SE - Chapter 7 Teknik Pengujian Perangkat Lunak
SE - Chapter 7 Teknik Pengujian Perangkat LunakSE - Chapter 7 Teknik Pengujian Perangkat Lunak
SE - Chapter 7 Teknik Pengujian Perangkat Lunak
Riza Nurman
 
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat LunakSE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
Riza Nurman
 
XML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESXML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICES
Riza Nurman
 
XML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASEXML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASE
Riza Nurman
 
XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)
Riza Nurman
 
XML - Chapter 5 XML DOM
XML - Chapter 5 XML DOMXML - Chapter 5 XML DOM
XML - Chapter 5 XML DOM
Riza Nurman
 
DBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseDBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan Database
Riza Nurman
 
DBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataDBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery Data
Riza Nurman
 
DBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseDBA BAB 3 - Manage Database
DBA BAB 3 - Manage Database
Riza Nurman
 
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
Riza Nurman
 
DBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorDBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database Administrator
Riza Nurman
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source Code
Riza Nurman
 
XML - Chapter 4
XML - Chapter 4XML - Chapter 4
XML - Chapter 4
Riza Nurman
 
XML - Chapter 3
XML - Chapter 3XML - Chapter 3
XML - Chapter 3
Riza Nurman
 
XML - Chapter 2
XML - Chapter 2XML - Chapter 2
XML - Chapter 2
Riza Nurman
 
XML - Chapter 1
XML - Chapter 1XML - Chapter 1
XML - Chapter 1
Riza Nurman
 
ADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages TechnologyADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages Technology
Riza Nurman
 

More from Riza Nurman (20)

TOT PHP DAY 1
TOT PHP DAY 1TOT PHP DAY 1
TOT PHP DAY 1
 
SE - Chapter 9 Pemeliharaan Perangkat Lunak
SE - Chapter 9 Pemeliharaan Perangkat LunakSE - Chapter 9 Pemeliharaan Perangkat Lunak
SE - Chapter 9 Pemeliharaan Perangkat Lunak
 
SE - Chapter 8 Strategi Pengujian Perangkat Lunak
SE - Chapter 8 Strategi Pengujian Perangkat LunakSE - Chapter 8 Strategi Pengujian Perangkat Lunak
SE - Chapter 8 Strategi Pengujian Perangkat Lunak
 
SE - Chapter 7 Teknik Pengujian Perangkat Lunak
SE - Chapter 7 Teknik Pengujian Perangkat LunakSE - Chapter 7 Teknik Pengujian Perangkat Lunak
SE - Chapter 7 Teknik Pengujian Perangkat Lunak
 
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat LunakSE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
 
XML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESXML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICES
 
XML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASEXML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASE
 
XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)
 
XML - Chapter 5 XML DOM
XML - Chapter 5 XML DOMXML - Chapter 5 XML DOM
XML - Chapter 5 XML DOM
 
DBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseDBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan Database
 
DBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataDBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery Data
 
DBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseDBA BAB 3 - Manage Database
DBA BAB 3 - Manage Database
 
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
 
DBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorDBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database Administrator
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source Code
 
XML - Chapter 4
XML - Chapter 4XML - Chapter 4
XML - Chapter 4
 
XML - Chapter 3
XML - Chapter 3XML - Chapter 3
XML - Chapter 3
 
XML - Chapter 2
XML - Chapter 2XML - Chapter 2
XML - Chapter 2
 
XML - Chapter 1
XML - Chapter 1XML - Chapter 1
XML - Chapter 1
 
ADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages TechnologyADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages Technology
 

Recently uploaded

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 

Sesi 6 4SC

  • 1. Riza Muhammad Nurman 4SC Click to edit Master title style SESI 6 on 4SC Q7 SESI 6 on 4SC Q7 FACULTYFACULTY Riza Muhammad NurmanRiza Muhammad Nurman Implementing RMI Server & ClientImplementing RMI Server & Client Facebook : https://facebook.com/rizamanFacebook : https://facebook.com/rizaman Twitter : https://twitter.com/rhyzoneTwitter : https://twitter.com/rhyzone SlideShare : https://slideshare.net/rizamanSlideShare : https://slideshare.net/rizaman
  • 2. Riza Muhammad Nurman 4SC Click to edit Master title styleContent • Membuat RMI Server • Membuat RMI Client
  • 3. Riza Muhammad Nurman 4SC Click to edit Master title styleCara Kerja SERVER CLIENT
  • 4. Riza Muhammad Nurman 4SC Click to edit Master title styleKonfigurasi RMI Server Apps • Buat Koneksi – Package : config – Class : Koneksi • Buat Object Remote – Package : object – Interface : IFaculty • Buat model – Package : model – Class : Faculty • Buat Main Class
  • 5. Riza Muhammad Nurman 4SC Click to edit Master title styleInterface IFaculty import java.rmi.Remote; import java.rmi.RemoteException; import java.util.ArrayList; public interface IFaculty extends Remote{ public String getFac_code() throws RemoteException; public void setFac_code(String fac_code)throws RemoteException; public String getFac_name() throws RemoteException; public void setFac_name(String fac_name) throws RemoteException; public String getFac_email() throws RemoteException; public void setFac_email(String fac_email) throws RemoteException; public String getFac_phone() throws RemoteException; public void setFac_phone(String fac_phone) throws RemoteException;; public int doInsert() throws RemoteException; public ArrayList display() throws RemoteException; public ArrayList getRecord() throws RemoteException; public int doUpdate() throws RemoteException; public int doDelete() throws RemoteException; }
  • 6. Riza Muhammad Nurman 4SC Click to edit Master title styleClass Faculty import config.Koneksi; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import object.IFaculty; public class Faculty extends UnicastRemoteObject implements IFaculty{ private String fac_code, fac_name, fac_email, fac_phone; private Koneksi obj_koneksi = new Koneksi(); public Faculty() throws RemoteException { super(); }
  • 7. Riza Muhammad Nurman 4SC Click to edit Master title styleMain Class public class Main { public static void main(String[] args) { try { Registry registry = LocateRegistry.createRegistry(1099); IFaculty obj = new Faculty(); registry.rebind("log", obj); System.out.println("Object is registered."); System.out.println("Now server is waiting for client request..."); } catch(RemoteException e) { System.out.println("FileServer: " + e); } } }
  • 8. Riza Muhammad Nurman 4SC Click to edit Master title styleKonfigurasi RMI Client Apps • Buat Object Remote – Package : object – Interface : IFaculty • Buat tampilan aplikasi – Package : view – Class : VMenu, VFacultyList, VFacultyForm • Buat folder images – Package : images – Tidak ada class cuma gambar Isi Interface dan nama package pada Object Remote RMI Client harus sama dengan RMI Server!
  • 9. Riza Muhammad Nurman 4SC Click to edit Master title styleVFacultyForm
  • 10. Riza Muhammad Nurman 4SC Click to edit Master title styleVFacultyForm - 2 public VFacultyForm() { initComponents(); btn_delete.setEnabled(false); btn_update.setEnabled(false); try { Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099); obj = (IFaculty) myRegistry.lookup("log"); } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } }
  • 11. Riza Muhammad Nurman 4SC Click to edit Master title styleVFacultyForm - 3 public VFacultyForm(String id) { initComponents(); btn_save.setEnabled(false); try { Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099); obj = (IFaculty) myRegistry.lookup("log"); } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } this.getRecord(id); }
  • 12. Riza Muhammad Nurman 4SC Click to edit Master title styleVFacultyList
  • 13. Riza Muhammad Nurman 4SC Click to edit Master title styleVFacultyList - 2 public VFacultyList() { initComponents(); try { Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", 1099); obj = (IFaculty) myRegistry.lookup("log"); } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } displayData(); }
  • 14. Riza Muhammad Nurman 4SC Click to edit Master title style