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:
- HTTP/TCP adaptors use TCP sockets,
- HTTP/UDP adaptors use UDP sockets.
- HTTP/SSL adaptors use SSL sockets.
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
-
AdaptorServerImpl()
- Initializes this
AdaptorServerImpl with the default port.
-
AdaptorServerImpl(int)
- Initializes this
AdaptorServerImpl with the specified port.
-
addUserAuthenticationInfo(AuthInfo)
- Adds the authentication information of the user to be authenticated by this server.
-
checkChallengeResponse(String)
- For Java DMK internal use only.
-
generateChallengeResponse()
- For Java DMK internal use only.
-
getClassVersion()
- Returns the version of this class.
-
getLastConnectedClient()
- Returns the IP address of the last connected client.
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- For Java DMK internal use only.
-
isAuthenticationOn()
- Returns true if the list of users supported by this server is not empty.
-
performStop()
-
-
removeUserAuthenticationInfo(AuthInfo)
- Removes the authentication information of the given user from the
list of users authenticated by this server.
AdaptorServerImpl
public AdaptorServerImpl()
- Initializes this
AdaptorServerImpl with the default port.
The default port is protocol-specific: its value is defined by the
derived classes.
AdaptorServerImpl
public AdaptorServerImpl(int p)
- Initializes this
AdaptorServerImpl with the specified port.
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
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
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.
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.
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.
getClassVersion
public String getClassVersion()
- Returns the version of this class.
- Returns:
- the version of this class.
generateChallengeResponse
public synchronized String generateChallengeResponse()
- For Java DMK internal use only.
Generate the server's challenge.
Message Format: "<CurrentTime@Hostname>"
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.
performStop
public void performStop()
- Overrides:
- performStop in class AdaptorServer
- See Also:
- AdaptorServer
All Packages Class Hierarchy This Package Previous Next Index