Java Networking(I) - PowerPoint PPT Presentation

About This Presentation
Title:

Java Networking(I)

Description:

Java Networking(I) Overview Java is a very good choice for networking programming. Client Socket Applet Java Web Start Java Network Launch Protocol ... – PowerPoint PPT presentation

Number of Views:85
Avg rating:3.0/5.0
Slides: 8
Provided by: Lendle
Category:

less

Transcript and Presenter's Notes

Title: Java Networking(I)


1
Java Networking(I)
  • ???

2
Overview
  • Java is a very good choice for networking
    programming.
  • Client
  • Socket
  • Applet
  • Java Web Start
  • Java Network Launch Protocol

3
Overview(cont.)
  • Server
  • ServerSocket
  • Servlet
  • JSP
  • Client Server
  • RMI
  • EJB
  • Soap
  • Web Service

4
Why Java Networking?
  • Java is very suitable for network programming for
    the following reason
  • Richness
  • As previously discussed, we have many
    java-technologies for network programming.
  • Simplicity
  • Traditionally, we use Berkerly socket for network
    programming, it is very complex, e.x., we will
    show an example to connect to network

5
Why Java Networking?(cont.)
With traditional socket library
familyAF_INET connectionSOCK_STREAM
socketidsocket(family,connection,IPPROTO_TCP) st
ruct hostent hp sockaddr1.sin_familyAF_INET
if(address0gt'1' address0lt'9'
address1gt'0' address1lt'9')
sockaddr1.sin_addr.s_addrinet_addr(address) conn
ect(socketid,(struct sockaddr )(sockaddr1),sizeo
f(sockaddr1))
With java
Socket socketnew Socket(address,port)
6
Why Java Networking?(cont.)
  • I/O functionality
  • Java has great power in I/O,and network
    transmitting is just an I/O operation

7
Why Java Networking?(cont.)
  • Naming ability
  • There is an API called JNDI which is used for
    searching remote objects. This is very important
    for distributed computing, an important issue for
    network programming.
  • Platform independence
  • This is also very important for distributed
    computing, since programs written on different
    platforms can co-work together easily.
Write a Comment
User Comments (0)
About PowerShow.com