The Application Layer


Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 20.  Network Programming

The top layer in the model is called the Application layer. This layer normally provides services such as encryption, compression, decryption, and decompression. You might hear this layer discussed in generic terms as the TCP/IP client or the TCP/IP server.

When TCP/IP was first created, the applications tended to be very simple. Over the years, clients have grown in sophistication so that now an Enterprise JavaBean (EJB) server resides completely in this layer. Figure 20.2 shows the layered architecture of an EJB server and an EJB client.

Figure 20.2. The EJB architecture.


The EJB clients and servers normally talk to each other using sockets. The client makes a request by opening a socket and placing a stream of data onto it. The server receives the request, processes it, and sends a stream containing the response back to the client.

In reality, most EJB servers and clients communicate using the Remote Method Invocation (RMI) facilities that are built into Java.


    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: