All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.ServiceHandler

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----sun.server.ServiceHandler

public abstract class ServiceHandler
extends Thread

Variable Index

 o PRIVATE_BYTE_ARR_SIZE
 o service
 o ts_buf

Constructor Index

 o ServiceHandler(Service)
Creates a new handler for the specified service.

Method Index

 o getBuffer()
Get this thread's multi-purpose byte array.
 o handleConnection(Socket)
Handles a single connection from the client.
 o run()
Runs the service handler.

Variables

 o service
 protected Service service
 o PRIVATE_BYTE_ARR_SIZE
 protected static final int PRIVATE_BYTE_ARR_SIZE
 o ts_buf
 protected byte ts_buf[]

Constructors

 o ServiceHandler
 protected ServiceHandler(Service service)
Creates a new handler for the specified service.

Parameters:
the - service for this handler

Methods

 o getBuffer
 public byte[] getBuffer()
Get this thread's multi-purpose byte array. Clients should be careful not to wipe out some caller's data. Generally, this should be used only when the client does not call any other server routines.

Returns:
the thread's private byte array
 o run
 public void run()
Runs the service handler.

Overrides:
run in class Thread
See Also:
getConnection, notifyExit
 o handleConnection
 protected abstract void handleConnection(Socket s) throws IOException
Handles a single connection from the client.

Parameters:
s - the socket connection

All Packages  Class Hierarchy  This Package  Previous  Next  Index