ExempleRMI.java. // Fichier de defintion des droits et proprietes // System.setProperty("java.security.policy","../server.java.

Size: px
Start display at page:

Download "ExempleRMI.java. // Fichier de defintion des droits et proprietes // System.setProperty("java.security.policy","../server.java."

Transcription

1 ExempleRMI.java import java.lang.*; import java.rmi.registry.*; import java.rmi.server.*; import java.io.*; import java.util.*; ExempleRMI.java import pkgexemple.*; public class ExempleRMI public static void main(string args[]) throws Exception int l_portadaptateur = 9999; int l_portserveursocket = 0; int l_portminclientsocket = 0; int l_portmaxclientsocket = 0; if (args.length == 4) l_portadaptateur = Integer.parseInt(args[0]); l_portserveursocket = Integer.parseInt(args[1]); l_portminclientsocket = Integer.parseInt(args[2]); l_portmaxclientsocket = Integer.parseInt(args[3]); Mise en place d'un SetSecurityManager ===================================== Fichier de defintion des droits et proprietes System.setProperty("java.security.policy","../server.java.policy"); Instanciation de la security if (l_portserveursocket!= 0) System.setSecurityManager(new RMISecurityManager()); Création de l'objet distribué HelloOD od = null; System.out.println("Création de l'objet distribué"); if (l_portserveursocket == 0) od = new HelloOD("Pierre","DUPONT"); else od = new HelloOD(l_portServeurSocket, l_portminclientsocket, l_portmaxclientsocket, "Pierre","DUPONT"); System.out.println("Enregistrement de l'objet distribué"); Naming.rebind("rmi:localhost:"+l_portAdaptateur+"/HELLO",od); System.out.println("Bus en ecoute..."); DataInputStream in = new DataInputStream(System.in); System.out.print("Taper rc, pour arreter le serveur..."); System.out.flush(); String valeur= in.readline(); Naming.unbind("rmi:localhost:"+l_portAdaptateur+"/HELLO"); UnicastRemoteObject.unexportObject(od, true /* pour forcer la destruction de l'od meme si il y encore des clients qui

2 l'utilisent */ ExempleRMI.java ); Page 2

3 Client2.java Client2.java import pkgexemple.*; public class Client2 public static void main(string args[]) throws Exception if (args.length == 3) System.setProperty("java.security.policy","../client.java.policy"); System.setSecurityManager(new RMISecurityManager()); HelloODInt helloservices = (HelloODInt)(Naming.lookup("rmi:"+args[0]+":"+args[1]+"/HELLO")); helloservices.setident(args[2],args[3]);

4 Client.java Client1.java import pkgexemple.*; public class Client1 public static void main(string args[]) throws Exception if (args.length == 3) System.setProperty("java.security.policy","../client.java.policy"); System.setSecurityManager(new RMISecurityManager()); HelloODInt helloservices = (HelloODInt)(Naming.lookup("rmi:"+args[0]+":"+args[1]+"/HELLO")); String messageold = ""; String message = ""; message = helloservices.hello(); while(true) if (message.equals(messageold)==false) System.out.println(message); messageold = message; message = helloservices.hello();

5 grant permission pour que le client puisse se connecter sur le port de l'adaptateur permission java.net.socketpermission "*:9999","connect,accept,listen,resolve"; permission pour que le client puisse se connecter sur l'objet distribué permission java.net.socketpermission "*:9200","connect,accept,listen,resolve"; permission pour que le client puisse se connecter aux ports locaux permission java.net.socketpermission "*: ","connect,accept,listen,resolve"; ;

6 grant On lui prefere une securite plus selectif: permission pour que le client puisse se connecter sur le port de l'adaptateur permission java.net.socketpermission "*:9999","connect,accept,listen,resolve"; permission pour que le client puisse se connecter sur l'objet distribué permission java.net.socketpermission "*:9200","connect,accept,listen,resolve"; permission pour que le client puisse se connecter sur les ports locaux permission java.net.socketpermission "*: ","connect,accept,listen,resolve"; ;

7 MyRMISocketFactory.java package pkgexemple; MyRMISocketFactory.java import java.rmi.server.*; import java.io.*; import java.net.*; import java.util.*; public class MyRMISocketFactory extends RMISocketFactory implements Serializable private String ident; private int portminlocalsocket; private int portmaxlocalsocket; public MyRMISocketFactory(String a_ident, int a_portminlocalsocket, int a_portmaxlocalsocket) super(); ident = a_ident; portminlocalsocket = a_portminlocalsocket; portmaxlocalsocket = a_portmaxlocalsocket; public Socket createsocket(string host, int port) throws IOException System.out.println(ident + " ** Creation d'un socket: "+ host+" "+port); System.out.println(ident + " ** plage local : " + portminlocalsocket + " " + portmaxlocalsocket); Socket socket=null; try InetAddress l_inetadress = InetAddress.getLocalHost(); int l_num=0; boolean l_fini=false; while(! l_fini) int l_port = portminlocalsocket+l_num; try socket = new Socket(host,port,l_inetAdress,l_port); System.out.println(" **Création du socket sur le port local: "+ l_port); l_fini=true; catch(exception l_ex2) System.out.println(" ** echec sur port local: "+l_port); l_num++; if (l_port > portmaxlocalsocket) l_fini=true; socket.setsotimeout(1000); socket.setsolinger(false,0); System.out.println(" ** remote port : "+ socket.getport()); System.out.println(" ** local port : "+ socket.getlocalport()); System.out.println(" ** local adress : "+ socket.getlocaladdress().tostring()); catch(exception l_ex)system.out.println(" ** Exception: "+l_ex); return socket; public ServerSocket createserversocket(int port) throws IOException System.out.println(ident + " Création du serveur de socket: "+port); return new ServerSocket(port);

8 HelloOD.java package pkgexemple; HelloOD.java import java.rmi.server.*; import pkgexemple.myrmisocketfactory; import pkgexemple.individu; public class HelloOD extends UnicastRemoteObject implements HelloODInt private Individu individu; public HelloOD(int a_portadaptateur, int a_portminclient, int a_portmaxclient, String nom,string prenom) throws RemoteException super(a_portadaptateur, (RMIClientSocketFactory)(new MyRMISocketFactory("*** [Client-side socket factory]", a_portminclient, a_portmaxclient)), (RMIServerSocketFactory)(new MyRMISocketFactory("*** [Server-side socket factory]", -1, -1)) ); System.out.println("Remote: "+this.tostring()); individu = new Individu(nom,prenom); public HelloOD(String nom,string prenom) throws RemoteException super(); System.out.println("Remote: "+this.tostring()); individu = new Individu(nom,prenom); public String hello() return("hello " + individu.getnom() + " " + individu.getprenom()); synchronized public void setident(string nom,string prenom) individu.setnom(nom); individu.setprenom(prenom); public Individu getindividu() return(individu); public void setindividu(individu a_individu) individu = a_individu;

9 HelloODInt.java package pkgexemple; HelloODInt.java public interface HelloODInt extends Remote POUR LE CAS A ============= public String hello() throws RemoteException; public void setident(string nom,string prenom) throws RemoteException; POUR LE CAS B ============= public Individu getindividu() throws RemoteException; public void setindividu(individu a_individu) throws RemoteException;

10 Individu.java package pkgexemple; Individu.java import java.rmi.server.*; import java.io.serializable; public class Individu implements Serializable String nom; String prenom; public Individu(String a_nom,string a_prenom) nom = a_nom; prenom = a_prenom; public String getnom()return(nom); public String getprenom()return(prenom); public void setnom(string a_nom)nom=a_nom; public void setprenom(string a_prenom)prenom=a_prenom; public boolean equals(object a_object) if (a_object == null) return false; Individu l_ind = (Individu)a_object; return( l_ind.nom.equals(this.nom) && l_ind.prenom.equals(this.prenom) );

! "# $%&'( ) * ).) "%&' 1* ( %&' ! "%&'2 (! ""$ 1! ""3($

! # $%&'( ) * ).) %&' 1* ( %&' ! %&'2 (! $ 1! 3($ ! "# $%&'( ) * +,'-( ).) /"0'" 1 %&' 1* ( %&' "%&'! "%&'2 (! ""$ 1! ""3($ 2 ', '%&' 2 , 3, 4( 4 %&'( 2(! ""$ -5%&'* -2%&'(* ) * %&' 2! ""$ -*! " 4 , - %&' 3( #5! " 5, '56! "* * 4(%&'(! ""$ 3(#! " 42/7'89.:&!

More information

When the transport layer tries to establish a connection with the server, it is blocked by the firewall. When this happens, the RMI transport layer

When the transport layer tries to establish a connection with the server, it is blocked by the firewall. When this happens, the RMI transport layer Firewall Issues Firewalls are inevitably encountered by any networked enterprise application that has to operate beyond the sheltering confines of an Intranet Typically, firewalls block all network traffic,

More information

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

TP1 : Correction. Rappels : Stream, Thread et Socket TCP Université Paris 7 M1 II Protocoles réseaux TP1 : Correction Rappels : Stream, Thread et Socket TCP Tous les programmes seront écrits en Java. 1. (a) Ecrire une application qui lit des chaines au clavier

More information

Network Communication

Network Communication Network Communication Outline Sockets Datagrams TCP/IP Client-Server model OSI Model Sockets Endpoint for bidirectional communication between two machines. To connect with each other, each of the client

More information

Remote Method Invocation

Remote Method Invocation 1 / 22 Remote Method Invocation Jean-Michel Richer jean-michel.richer@univ-angers.fr http://www.info.univ-angers.fr/pub/richer M2 Informatique 2010-2011 2 / 22 Plan Plan 1 Introduction 2 RMI en détails

More information

Brazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/

Brazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/ Brazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/ version du 26 Mai 2003 : JDBC-SQL et Brazil pré-requis : lecture de Tutorial JDBC de Sun Bibliographie Brazil [Bra00]www.sun.com/research/brazil

More information

Network/Socket Programming in Java. Rajkumar Buyya

Network/Socket Programming in Java. Rajkumar Buyya Network/Socket Programming in Java Rajkumar Buyya Elements of C-S Computing a client, a server, and network Client Request Result Network Server Client machine Server machine java.net Used to manage: URL

More information

Remote Method Invocation

Remote Method Invocation Remote Method Invocation The network is the computer Consider the following program organization: method call SomeClass AnotherClass returned object computer 1 computer 2 If the network is the computer,

More information

Programmation RMI Sécurisée

Programmation RMI Sécurisée Programmation RMI Sécurisée 5 janvier 2012 D après http ://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_based. A Code RMI de Base A.1 Les fichiers Hello.java public i n t e r f a c e Hello extends

More information

Application Development with TCP/IP. Brian S. Mitchell Drexel University

Application Development with TCP/IP. Brian S. Mitchell Drexel University Application Development with TCP/IP Brian S. Mitchell Drexel University Agenda TCP/IP Application Development Environment Client/Server Computing with TCP/IP Sockets Port Numbers The TCP/IP Application

More information

Remote Method Invocation in JAVA

Remote Method Invocation in JAVA Remote Method Invocation in JAVA Philippe Laroque Philippe.Laroque@dept-info.u-cergy.fr $Id: rmi.lyx,v 1.2 2003/10/23 07:10:46 root Exp $ Abstract This small document describes the mechanisms involved

More information

TP N 10 : Gestion des fichiers Langage JAVA

TP N 10 : Gestion des fichiers Langage JAVA TP N 10 : Gestion des fichiers Langage JAVA Rappel : Exemple d utilisation de FileReader/FileWriter import java.io.*; public class Copy public static void main(string[] args) throws IOException File inputfile

More information

Cours. Client/serveur avancé en Java (servlets, RMI, etc.) M.M.F.A.I. François Bourdoncle Francois.Bourdoncle@ensmp.fr http://www.ensmp.

Cours. Client/serveur avancé en Java (servlets, RMI, etc.) M.M.F.A.I. François Bourdoncle Francois.Bourdoncle@ensmp.fr http://www.ensmp. Cours Système et Réseaux M.M.F.A.I. Client/serveur avancé en Java (servlets, RMI, etc.) François Bourdoncle Francois.Bourdoncle@ensmp.fr http://www.ensmp.fr/ bourdonc/ 1 Plan Servlets RMI Implémentation

More information

Socket Programming in Java

Socket Programming in Java Socket Programming in Java Learning Objectives The InetAddress Class Using sockets TCP sockets Datagram Sockets Classes in java.net The core package java.net contains a number of classes that allow programmers

More information

Introduktion til distribuerede systemer uge 37 - fil og webserver

Introduktion til distribuerede systemer uge 37 - fil og webserver Introduktion til distribuerede systemer uge 37 - fil og webserver Rune Højsgaard 090678 1. delsstuderende 13. september 2005 1 Kort beskrivelse Implementationen af filserver og webserver virker, men håndterer

More information

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab.

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab. Chulalongkorn University Name International School of Engineering Student ID Department of Computer Engineering Station No. 2140105 Computer Programming Lab. Date Lab 2 Using Java API documents, command

More information

TP : Système de messagerie - Fichiers properties - PrepareStatement

TP : Système de messagerie - Fichiers properties - PrepareStatement TP : Système de messagerie - Fichiers properties - PrepareStatement exelib.net Une société souhaite mettre en place un système de messagerie entre ses employés. Les travaux de l équipe chargée de l analyse

More information

Java Network. Slides prepared by : Farzana Rahman

Java Network. Slides prepared by : Farzana Rahman Java Network Programming 1 Important Java Packages java.net java.io java.rmi java.security java.lang TCP/IP networking I/O streams & utilities Remote Method Invocation Security policies Threading classes

More information

Question1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime?

Question1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime? CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Working as a group. Working in small gruops of 2-4 students. When you work as a group, you have to return only one home assignment per

More information

Remote Method Invocation (RMI)

Remote Method Invocation (RMI) Remote Method Invocation (RMI) Remote Method Invocation (RMI) allows us to get a reference to an object on a remote host and use it as if it were on our virtual machine. We can invoke methods on the remote

More information

Java Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol).

Java Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). Java Network Programming The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). The DatagramSocket class uses UDP (connectionless protocol). The java.net.socket

More information

DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen

DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen Aufgabe 1 RMI - TimeService public interface TimeServerInterface extends Remote { public String gettime() throws RemoteException; import java.util.date;

More information

Chapter 2 Introduction to Java programming

Chapter 2 Introduction to Java programming Chapter 2 Introduction to Java programming 1 Keywords boolean if interface class true char else package volatile false byte final switch while throws float private case return native void protected break

More information

Assignment 4 Solutions

Assignment 4 Solutions CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Solutions Working as a pair Working in pairs. When you work as a pair you have to return only one home assignment per pair on a round.

More information

Creating a Simple, Multithreaded Chat System with Java

Creating a Simple, Multithreaded Chat System with Java Creating a Simple, Multithreaded Chat System with Java Introduction by George Crawford III In this edition of Objective Viewpoint, you will learn how to develop a simple chat system. The program will demonstrate

More information

Lesson: All About Sockets

Lesson: All About Sockets All About Sockets http://java.sun.com/docs/books/tutorial/networking/sockets/index.html Page 1 sur 1 The Java TM Tutorial Start of Tutorial > Start of Trail Trail: Custom Networking Lesson: All About Sockets

More information

POB-JAVA Documentation

POB-JAVA Documentation POB-JAVA Documentation 1 INTRODUCTION... 4 2 INSTALLING POB-JAVA... 5 Installation of the GNUARM compiler... 5 Installing the Java Development Kit... 7 Installing of POB-Java... 8 3 CONFIGURATION... 9

More information

public static void main(string[] args) { System.out.println("hello, world"); } }

public static void main(string[] args) { System.out.println(hello, world); } } Java in 21 minutes hello world basic data types classes & objects program structure constructors garbage collection I/O exceptions Strings Hello world import java.io.*; public class hello { public static

More information

C:\Documents and Settings\Gijs\Desktop\src\client\Client.java dinsdag 3 november 2009 10:50

C:\Documents and Settings\Gijs\Desktop\src\client\Client.java dinsdag 3 november 2009 10:50 C:\Documents and Settings\Gijs\Desktop\src\client\Client.java dinsdag 3 november 2009 10:50 package client; import hotel.bookingconstraints; import hotel.bookingexception; import hotel.costumersessionremote;

More information

Licence Informatique Année 2005-2006. Exceptions

Licence Informatique Année 2005-2006. Exceptions Université Paris 7 Java Licence Informatique Année 2005-2006 TD n 8 - Correction Exceptions Exercice 1 La méthode parseint est spécifiée ainsi : public static int parseint(string s) throws NumberFormatException

More information

JAVA Program For Processing SMS Messages

JAVA Program For Processing SMS Messages JAVA Program For Processing SMS Messages Krishna Akkulu The paper describes the Java program implemented for the MultiModem GPRS wireless modem. The MultiModem offers standards-based quad-band GSM/GPRS

More information

Division of Informatics, University of Edinburgh

Division of Informatics, University of Edinburgh CS1Bh Lecture Note 20 Client/server computing A modern computing environment consists of not just one computer, but several. When designing such an arrangement of computers it might at first seem that

More information

Programming Assignment: Development of a Proxy Cache

Programming Assignment: Development of a Proxy Cache Programming Assignment: Development of a Proxy Cache La prova avrà una valutazione da 0 a 3 punti da aggiungere alla media dell esito delle due prove di esonero scritte. La gestione dei thread non è da

More information

B.Sc (Honours) - Software Development

B.Sc (Honours) - Software Development Galway-Mayo Institute of Technology B.Sc (Honours) - Software Development E-Commerce Development Technologies II Lab Session Using the Java URLConnection Class The purpose of this lab session is to: (i)

More information

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca

More information

Langages Orientés Objet Java

Langages Orientés Objet Java Langages Orientés Objet Java Exceptions Arnaud LANOIX Université Nancy 2 24 octobre 2006 Arnaud LANOIX (Université Nancy 2) Langages Orientés Objet Java 24 octobre 2006 1 / 32 Exemple public class Example

More information

Programmation Orientée Objets. et langage Java

Programmation Orientée Objets. et langage Java Programmation Orientée Objets et langage Java Programmation procédurale Construire(Maison m){ creuser(fouilles); commander(béton) couler(fouilles); commander(parpaings); while(!fini(sous-sol)){poser(parpaings);

More information

!"# $ %!&' # &! ())*!$

!# $ %!&' # &! ())*!$ !"# $ %!&' # &! ())*!$ !" #!$ %& ' ( ) * +,--!&"" $.!! /+010!" +!, 31! 4)&/0! $ #"5!! & + 6+ " 5 0 7 /&8-9%& ( +" 5)& /*#.! &( $ 1(" 5 # ( 8 +1 + # + 7$ (+!98 +&%& ( +!" (!+!/ (!-. 5 7 (! 7 1+1( & + ":!

More information

Liste d'adresses URL

Liste d'adresses URL Liste de sites Internet concernés dans l' étude Le 25/02/2014 Information à propos de contrefacon.fr Le site Internet https://www.contrefacon.fr/ permet de vérifier dans une base de donnée de plus d' 1

More information

Mail User Agent Project

Mail User Agent Project Mail User Agent Project Tom Kelliher, CS 325 100 points, due May 4, 2011 Introduction (From Kurose & Ross, 4th ed.) In this project you will implement a mail user agent (MUA) that sends mail to other users.

More information

Projet Java. Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan)

Projet Java. Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Projet Java Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Objectives - Apprendre à programmer en Java - Travailler à plusieurs sur un gros projet qui a plusieurs aspects: graphisme, interface

More information

OBJECT ORIENTED PROGRAMMING LANGUAGE

OBJECT ORIENTED PROGRAMMING LANGUAGE UNIT-6 (MULTI THREADING) Multi Threading: Java Language Classes The java.lang package contains the collection of base types (language types) that are always imported into any given compilation unit. This

More information

2 RENSEIGNEMENTS CONCERNANT L ASSURÉ SI CELUI-CI N EST PAS LE REQUÉRANT INFORMATION CONCERNING THE INSURED PERSON IF OTHER THAN THE APPLICANT

2 RENSEIGNEMENTS CONCERNANT L ASSURÉ SI CELUI-CI N EST PAS LE REQUÉRANT INFORMATION CONCERNING THE INSURED PERSON IF OTHER THAN THE APPLICANT SÉCURITÉ SOCIALE SOCIAL SECURITY ACCORD DU 9 FÉVRIER 1979 ENTRE LA FRANCE ET LE CANADA AGREEMENT OF FEBRUARY 9, 1979 BETWEEN FRANCE AND CANADA Formulaire FORM SE 401-06 INSTRUCTION D UNE DEMANDE DE PENSION

More information

Remote Method Invocation

Remote Method Invocation Goal of RMI Remote Method Invocation Implement distributed objects. Have a program running on one machine invoke a method belonging to an object whose execution is performed on another machine. Remote

More information

TP JSP : déployer chaque TP sous forme d'archive war

TP JSP : déployer chaque TP sous forme d'archive war TP JSP : déployer chaque TP sous forme d'archive war TP1: fichier essai.jsp Bonjour Le Monde JSP Exemple Bonjour Le Monde. Après déploiement regarder dans le répertoire work de l'application

More information

Advanced Network Programming Lab using Java. Angelos Stavrou

Advanced Network Programming Lab using Java. Angelos Stavrou Advanced Network Programming Lab using Java Angelos Stavrou Table of Contents A simple Java Client...3 A simple Java Server...4 An advanced Java Client...5 An advanced Java Server...8 A Multi-threaded

More information

NETWORK PROGRAMMING IN JAVA USING SOCKETS

NETWORK PROGRAMMING IN JAVA USING SOCKETS NETWORK PROGRAMMING IN JAVA USING SOCKETS Prerna Malik, Poonam Rawat Student, Dronacharya College of Engineering, Gurgaon, India Abstract- Network programming refers to writing programs that could be processed

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

The Java Series Introduction to Java RMI and CORBA. The Java Series. Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1

The Java Series Introduction to Java RMI and CORBA. The Java Series. Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1 The Java Series Introduction to Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1 What are RMI and CORBA for? Usually, in your application, once you instantiate objects, you can invoke methods

More information

Java Programming Fundamentals

Java Programming Fundamentals Lecture 1 Part I Java Programming Fundamentals Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Introduction to Java We start by making a few

More information

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Veuillez vérifier les éléments suivants avant de nous soumettre votre accord : 1. Vous avez bien lu et paraphé

More information

CSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O

CSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O CSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O 1 Sending Output to a (Text) File import java.util.scanner; import java.io.*; public class TextFileOutputDemo1 public static void

More information

Introduction to Java. Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233. ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1

Introduction to Java. Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233. ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1 Introduction to Java Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233 ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1 What Is a Socket? A socket is one end-point of a two-way

More information

TDD et Erlang. Nicolas Charpentier - Dominic Williams. 30 Mars 2009. charpi.net - dominicwilliams.net

TDD et Erlang. Nicolas Charpentier - Dominic Williams. 30 Mars 2009. charpi.net - dominicwilliams.net TDD et Erlang Nicolas Charpentier - Dominic Williams charpi.net - dominicwilliams.net 30 Mars 2009 c N.Charpentier - D.Williams TDD et Erlang 1/23 Pourquoi certaines startups s interessent elles à Erlang

More information

An Android-based Instant Message Application

An Android-based Instant Message Application An Android-based Instant Message Application Qi Lai, Mao Zheng and Tom Gendreau Department of Computer Science University of Wisconsin - La Crosse La Crosse, WI 54601 mzheng@uwlax.edu Abstract One of the

More information

Les Broadcast Receivers...

Les Broadcast Receivers... Les Broadcast Receivers... http://developer.android.com/reference/android/content/broadcastreceiver.html Mécanisme qui, une fois «enregistré» dans le système, peut recevoir des Intents Christophe Logé

More information

Thursday, February 7, 2013. DOM via PHP

Thursday, February 7, 2013. DOM via PHP DOM via PHP Plan PHP DOM PHP : Hypertext Preprocessor Langage de script pour création de pages Web dynamiques Un ficher PHP est un ficher HTML avec du code PHP

More information

Building a Multi-Threaded Web Server

Building a Multi-Threaded Web Server Building a Multi-Threaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket.

String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket. 164 CHAPTER 2 APPLICATION LAYER connection requests, as done in TCPServer.java. If multiple clients access this application, they will all send their packets into this single door, serversocket. String

More information

Stockage distribué sous Linux

Stockage distribué sous Linux Félix Simon Ludovic Gauthier IUT Nancy-Charlemagne - LP ASRALL Mars 2009 1 / 18 Introduction Répartition sur plusieurs machines Accessibilité depuis plusieurs clients Vu comme un seul et énorme espace

More information

Building a Java chat server

Building a Java chat server Building a Java chat server Presented by developerworks, your source for great tutorials Table of Contents If you're viewing this document online, you can click any of the topics below to link directly

More information

Aucune validation n a été faite sur l exemple.

Aucune validation n a été faite sur l exemple. Cet exemple illustre l utilisation du Type BLOB dans la BD. Aucune validation n a été faite sur l exemple. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;

More information

Annexe - OAuth 2.0. 1 Introduction. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014

Annexe - OAuth 2.0. 1 Introduction. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014 1 Introduction Annexe - OAuth 2.0. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014 Alternativement à Flickr, notre serveur pourrait proposer aux utilisateurs l utilisation de leur

More information

Certificate of Incorporation Certificat de constitution

Certificate of Incorporation Certificat de constitution Request ID: 014752622 Province of Ontario Date Report Produced: 2012/10/30 Demande n : Province de ('Ontario Document produit le: Transaction ID: 0491 1 1 718 Ministry of Government Services Time Report

More information

Crash Course in Java

Crash Course in Java Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is

More information

Socket Programming. A er learning the contents of this chapter, the reader will be able to:

Socket Programming. A er learning the contents of this chapter, the reader will be able to: Java Socket Programming This chapter presents key concepts of intercommunication between programs running on different computers in the network. It introduces elements of network programming and concepts

More information

Message Oriented Middlewares

Message Oriented Middlewares Message Oriented Middlewares Fabienne Boyer, fabienne.boyer@inria.fr Introduction RPC Synchronous communications Explicit identification of the receiver(s) 1-1 connexion -> Strongly coupled components

More information

Manual. Programmer's Guide for Java API

Manual. Programmer's Guide for Java API 2013-02-01 1 (15) Programmer's Guide for Java API Description This document describes how to develop Content Gateway services with Java API. TS1209243890 1.0 Company information TeliaSonera Finland Oyj

More information

Congo Republic Tourist visa Application

Congo Republic Tourist visa Application Congo Republic Tourist visa Application Please enter your contact information Name: Email: Tel: Mobile: The latest date you need your passport returned in time for your travel: Congo Republic tourist visa

More information

Power Distribution System. Additional Information on page 2 See Page 2 Page 6. Eaton. See Page 2. Additional Information on page 2

Power Distribution System. Additional Information on page 2 See Page 2 Page 6. Eaton. See Page 2. Additional Information on page 2 IEC SYSTEM FOR MUTUAL RECOGNITION OF TEST CERTIFICATES FOR ELECTRICAL EQUIPMENT (IECEE) CB SCHEME SYSTEME CEI D ACCEPTATION MUTUELLE DE CERTIFICATS D ESSAIS DES EQUIPEMENTS ELECTRIQUES (IECEE) METHODE

More information

java Features Version April 19, 2013 by Thorsten Kracht

java Features Version April 19, 2013 by Thorsten Kracht java Features Version April 19, 2013 by Thorsten Kracht Contents 1 Introduction 2 1.1 Hello World................................................ 2 2 Variables, Types 3 3 Input/Output 4 3.1 Standard I/O................................................

More information

Threads in der Client/Server-Programmierung mit Java

Threads in der Client/Server-Programmierung mit Java Threads in der Client/Server-Programmierung mit Java Zahlenraten: Protokoll CLIENT / Comm? Comm! / max / SERVER Comm? / Comm! / 100 trial / / cmp(trial) [ cmp(trial) = < or cmp(trial) = > ] [ answer =

More information

Network Programming using sockets

Network Programming using sockets Network Programming using sockets TCP/IP layers Layers Message Application Transport Internet Network interface Messages (UDP) or Streams (TCP) UDP or TCP packets IP datagrams Network-specific frames Underlying

More information

"Internationalization vs. Localization: The Translation of Videogame Advertising"

Internationalization vs. Localization: The Translation of Videogame Advertising Article "Internationalization vs. Localization: The Translation of Videogame Advertising" Raquel de Pedro Ricoy Meta : journal des traducteurs / Meta: Translators' Journal, vol. 52, n 2, 2007, p. 260-275.

More information

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files File I/O - Chapter 10 A Java stream is a sequence of bytes. An InputStream can read from a file the console (System.in) a network socket an array of bytes in memory a StringBuffer a pipe, which is an OutputStream

More information

Java Programming: Sockets in Java

Java Programming: Sockets in Java Java Programming: Sockets in Java Manuel Oriol May 10, 2007 1 Introduction Network programming is probably one of the features that is most used in the current world. As soon as people want to send or

More information

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design Plafond tendu à froid ALYOS technology ALYOS technology vous propose un ensemble de solutions techniques pour vos intérieurs. Spécialiste dans le domaine du plafond tendu, nous avons conçu et développé

More information

Audit de sécurité avec Backtrack 5

Audit de sécurité avec Backtrack 5 Audit de sécurité avec Backtrack 5 DUMITRESCU Andrei EL RAOUSTI Habib Université de Versailles Saint-Quentin-En-Yvelines 24-05-2012 UVSQ - Audit de sécurité avec Backtrack 5 DUMITRESCU Andrei EL RAOUSTI

More information

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous Contents 1. Introduction 2. Types and Variables 3. Statements and Control Flow 4. Reading Input 5. Classes and Objects 6. Arrays 7. Methods 8. Scope and Lifetime 9. Utility classes 10. Introduction to

More information

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr Cours de Java Sciences-U Lyon Java - Introduction Java - Fondamentaux Java Avancé http://www.rzo.free.fr Pierre PARREND 1 Octobre 2004 Sommaire Java Introduction Java Fondamentaux Java Avancé GUI Graphical

More information

JDBC. It is connected by the Native Module of dependent form of h/w like.dll or.so. ex) OCI driver for local connection to Oracle

JDBC. It is connected by the Native Module of dependent form of h/w like.dll or.so. ex) OCI driver for local connection to Oracle JDBC 4 types of JDBC drivers Type 1 : JDBC-ODBC bridge It is used for local connection. ex) 32bit ODBC in windows Type 2 : Native API connection driver It is connected by the Native Module of dependent

More information

Multithreaded Programming

Multithreaded Programming Java Multithreaded Programming This chapter presents multithreading, which is one of the core features supported by Java. The chapter introduces the need for expressing concurrency to support simultaneous

More information

Calcul parallèle avec R

Calcul parallèle avec R Calcul parallèle avec R ANF R Vincent Miele CNRS 07/10/2015 Pour chaque exercice, il est nécessaire d ouvrir une fenètre de visualisation des processes (Terminal + top sous Linux et Mac OS X, Gestionnaire

More information

Brekeke PBX Web Service

Brekeke PBX Web Service Brekeke PBX Web Service User Guide Brekeke Software, Inc. Version Brekeke PBX Web Service User Guide Revised October 16, 2006 Copyright This document is copyrighted by Brekeke Software, Inc. Copyright

More information

Report of the case study in Sistemi Distribuiti A simple Java RMI application

Report of the case study in Sistemi Distribuiti A simple Java RMI application Report of the case study in Sistemi Distribuiti A simple Java RMI application Academic year 2012/13 Vessio Gennaro Marzulli Giovanni Abstract In the ambit of distributed systems a key-role is played by

More information

Benin Business visa Application

Benin Business visa Application Benin Business visa Application Please enter your contact information Name: Email: Tel: Mobile: The latest date you need your passport returned in time for your travel: Benin business visa checklist Filled

More information

Transport layer protocols. Message destination: Socket +Port. Asynchronous vs. Synchronous. Operations of Request-Reply. Sockets

Transport layer protocols. Message destination: Socket +Port. Asynchronous vs. Synchronous. Operations of Request-Reply. Sockets Transport layer protocols Interprocess communication Synchronous and asynchronous comm. Message destination Reliability Ordering Client Server Lecture 15: Operating Systems and Networks Behzad Bordbar

More information

Lecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss

Lecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss Lecture 7: Java RMI CS178: Programming Parallel and Distributed Systems February 14, 2001 Steven P. Reiss I. Overview A. Last time we started looking at multiple process programming 1. How to do interprocess

More information

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits)

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits) Binary I/O streams (ascii, 8 bits) InputStream OutputStream The Java I/O System The decorator design pattern Character I/O streams (Unicode, 16 bits) Reader Writer Comparing Binary I/O to Character I/O

More information

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10)

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10) File class in Java File Input and Output (Savitch, Chapter 10) TOPICS File Input Exception Handling File Output Programmers refer to input/output as "I/O". The File class represents files as objects. The

More information

Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré

Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré Asterisk et la ToIP Projet tuteuré Luis Alonso Domínguez López, Romain Gegout, Quentin Hourlier, Benoit Henryon IUT Charlemagne, Licence ASRALL 2008-2009 31 mars 2009 Asterisk et la ToIP 31 mars 2009 1

More information

CS 121 Intro to Programming:Java - Lecture 11 Announcements

CS 121 Intro to Programming:Java - Lecture 11 Announcements CS 121 Intro to Programming:Java - Lecture 11 Announcements Next Owl assignment up, due Friday (it s short!) Programming assignment due next Monday morning Preregistration advice: More computing? Take

More information

Threads & Tasks: Executor Framework

Threads & Tasks: Executor Framework Threads & Tasks: Executor Framework Introduction & Motivation WebServer Executor Framework Callable and Future 12 April 2012 1 Threads & Tasks Motivations for using threads Actor-based Goal: Create an

More information

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme GEAL 1.2 Generic Evolutionary Algorithm Library http://dpt-info.u-strasbg.fr/~blansche/fr/geal.html 1 /38 Introduction GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires Objectifs Généricité

More information

Apéndice C: Código Fuente del Programa DBConnection.java

Apéndice C: Código Fuente del Programa DBConnection.java Apéndice C: Código Fuente del Programa DBConnection.java import java.sql.*; import java.io.*; import java.*; import java.util.*; import java.net.*; public class DBConnection Connection pgsqlconn = null;

More information

RAPPORT FINANCIER ANNUEL PORTANT SUR LES COMPTES 2014

RAPPORT FINANCIER ANNUEL PORTANT SUR LES COMPTES 2014 RAPPORT FINANCIER ANNUEL PORTANT SUR LES COMPTES 2014 En application de la loi du Luxembourg du 11 janvier 2008 relative aux obligations de transparence sur les émetteurs de valeurs mobilières. CREDIT

More information

Configuration Guide. SafeNet Authentication Service. SAS Agent for AD FS

Configuration Guide. SafeNet Authentication Service. SAS Agent for AD FS SafeNet Authentication Service Configuration Guide SAS Agent for AD FS Technical Manual Template Release 1.0, PN: 000-000000-000, Rev. A, March 2013, Copyright 2013 SafeNet, Inc. All rights reserved. 1

More information

Intel Retail Client Manager Audience Analytics

Intel Retail Client Manager Audience Analytics Intel Retail Client Manager Audience Analytics By using this document, in addition to any agreements you have with Intel, you accept the terms set forth below. You may not use or facilitate the use of

More information

Tuple spaces and Object spaces. Distributed Object Systems 12. Tuple spaces and Object spaces. Communication. Tuple space. Mechanisms 2.

Tuple spaces and Object spaces. Distributed Object Systems 12. Tuple spaces and Object spaces. Communication. Tuple space. Mechanisms 2. Distributed Object Systems 12 Tuple spaces and Object spaces Tuple spaces and Object spaces Tuple spaces Shared memory as a mechanism for exchanging data in a distributed setting (i.e. separate from processes)

More information