All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.adaptor.comm.AdaptorServerImpl

java.lang.Object
   |
   +----com.sun.jaw.impl.adaptor.generic.AdaptorServer
           |
           +----com.sun.jaw.impl.adaptor.comm.AdaptorServerImpl

public abstract class AdaptorServerImpl
extends AdaptorServer
This class implements the common behaviour for the server part of the HTTP-based adaptors. HTTP/TCP, HTTP/UDP and HTTP/SSL adaptors extend this class and inherit this behaviour.

HTTP/TCP, HTTP/UDP and HTTP/SSL adaptors differ by the socket type they used to communicate between the server and the client:

However the features and the behaviour of these adaptors are the same. They are implemented in this class and described below.

The data transmitted between the client and server parts is the same in both adaptors: these are serialized Java objects encoded as HTTP requests and responses.

The three adaptors can perform user authentication. The add/remove user authentication info methods are used to add/remove users and their corresponding authentication information. If this server carries out client authentication then clients connecting to this server are authenticated using the 'CRAM-MD5 Access Authentication Scheme' as defined in RFCs 2104 and 2195.

The three adaptors use the same default value (10) for the maxActiveClientCount property. When an adaptor is stopped, the active requests are interrupted and an error result is sent to the clients.

See Also:
AdaptorClient

Constructor Index

 o AdaptorServerImpl()
Initializes this AdaptorServerImpl with the default port.
 o AdaptorServerImpl(int)
Initializes this AdaptorServerImpl with the specified port.

Method Index

 o addUserAuthenticationInfo(AuthInfo)
Adds the authentication information of the user to be authenticated by this server.
 o checkChallengeResponse(String)
For Java DMK internal use only.
 o generateChallengeResponse()
For Java DMK internal use only.
 o getClassVersion()
Returns the version of this class.
 o getLastConnectedClient()
Returns the IP address of the last connected client.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
For Java DMK internal use only.
 o isAuthenticationOn()
Returns true if the list of users supported by this server is not empty.
 o performStop()
 o removeUserAuthenticationInfo(AuthInfo)
Removes the authentication information of the given user from the list of users authenticated by this server.

Constructors

 o AdaptorServerImpl
 public AdaptorServerImpl()
Initializes this AdaptorServerImpl with the default port. The default port is protocol-specific: its value is defined by the derived classes.

 o AdaptorServerImpl
 public AdaptorServerImpl(int p)
Initializes this AdaptorServerImpl with the specified port.

Methods

 o initCmf
 public void initCmf(Framework f,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
For Java DMK internal use only.

Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
Overrides:
initCmf in class AdaptorServer
 o getLastConnectedClient
 public String getLastConnectedClient()
Returns the IP address of the last connected client. This function uses the string representation of java.net.InetAddress.

Returns:
the IP address of the last connected client.
See Also:
InetAddress
 o addUserAuthenticationInfo
 public synchronized void addUserAuthenticationInfo(AuthInfo authinfo)
Adds the authentication information of the user to be authenticated by this server. In order to populate the list of users supported by this server invoke this method for each user you want to add.

Parameters:
authinfo - the user authentication information.
 o removeUserAuthenticationInfo
 public synchronized void removeUserAuthenticationInfo(AuthInfo authinfo)
Removes the authentication information of the given user from the list of users authenticated by this server.

Parameters:
authinfo - the user authentication information.
 o isAuthenticationOn
 public boolean isAuthenticationOn()
Returns true if the list of users supported by this server is not empty.

Returns:
True, if the list of users supported by this server is not empty. False, if the list of supported users is empty so no authentication is performed by this server.
 o getClassVersion
 public String getClassVersion()
Returns the version of this class.

Returns:
the version of this class.
 o generateChallengeResponse
 public synchronized String generateChallengeResponse()
For Java DMK internal use only.

Generate the server's challenge.

Message Format: "<CurrentTime@Hostname>"

 o checkChallengeResponse
 public synchronized boolean checkChallengeResponse(String response)
For Java DMK internal use only.

Check if the response sent by the client matches any of the challenges stored in the server. If the match is successful then the client has been authenticated and the method returns true. False, otherwise.

 o performStop
 public void performStop()
Overrides:
performStop in class AdaptorServer
See Also:
AdaptorServer

All Packages  Class Hierarchy  This Package  Previous  Next  Index