|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.jdmk.comm.CommunicatorServer
com.sun.jdmk.comm.GenericHttpConnectorServer
JdmkLegacyConnector.
This class implements the common behavior for the server part of the HTTP-based connectors. The HTTP/TCP connector extends this class and inherits this behavior.
The HTTP-based connectors differ by the socket type they use to communicate between the server and the client:
The data transmitted between the client and server parts is the same in both connectors: these are serialized Java objects encoded as HTTP requests and responses.
The two connectors 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.
An HTTP-based connector server may serve several clients concurrently. The
number of concurrent clients can be limited using the property maxActiveClientCount.
The HTTP/TCP connector specifies a default value (10) for the
maxActiveClientCount property. When a connector is stopped, the
active requests are interrupted and an error result is sent to the clients.
GenericHttpConnectorClient| Field Summary |
| Fields inherited from class com.sun.jdmk.comm.CommunicatorServer |
HTML_TYPE, HTTP_TYPE, HTTPS_TYPE, OFFLINE, ONLINE, RMI_TYPE, SNMP_TYPE, STARTING, STOPPING |
| Constructor Summary | |
GenericHttpConnectorServer(int connectorType)
Deprecated. Initializes this GenericHttpConnectorServer with the
default port. |
|
GenericHttpConnectorServer(int connectorType,
int port)
Deprecated. Initializes this GenericHttpConnectorServer with the
specified port. |
|
GenericHttpConnectorServer(int connectorType,
int port,
AuthInfo[] authInfoList)
Deprecated. Initializes this GenericHttpConnectorServer with the
specified port and user authentication information list. |
|
GenericHttpConnectorServer(int connectorType,
int port,
AuthInfo[] authInfoList,
InetAddress bindAddr)
Deprecated. Initializes this GenericHttpConnectorServer with the specified port and
user authentication information list. |
|
GenericHttpConnectorServer(int connectorType,
int port,
InetAddress bindAddr)
Deprecated. Initializes this GenericHttpConnectorServer with the specified port. |
|
| Method Summary | |
void |
addUserAuthenticationInfo(AuthInfo authinfo)
Deprecated. Adds user authentication information to this server. |
protected void |
doBind()
Deprecated. |
protected void |
doError(Exception e)
Deprecated. |
protected void |
doProcess()
Deprecated. doProcess() is called after doReceive():
it should process the requests of the incoming client. |
protected void |
doReceive()
Deprecated. doReceive() should block until a client is available. |
protected void |
doUnbind()
Deprecated. doUnbind() is called whenever the connector goes
OFFLINE, except if doBind() has
thrown an exception. |
int |
getActiveClientCount()
Deprecated. Gets the number of clients currently being processed by this GenericHttpConnectorServer. |
String |
getLastConnectedClient()
Deprecated. Gets the IP address of the last connected client. |
int |
getMaxActiveClientCount()
Deprecated. Gets the maximum number of clients that this GenericHttpConnectorServer can process concurrently. |
int |
getServedClientCount()
Deprecated. Gets the number of clients that have been processed by this GenericHttpConnectorServer
since its creation. |
boolean |
isAuthenticationOn()
Deprecated. Returns true if the list of users supported by this server is not empty. |
void |
postDeregister()
Deprecated. Allows the MBean to perform any operations needed after having been de-registered from the MBean server. |
void |
postRegister(Boolean registrationDone)
Deprecated. Allows the MBean to perform any operations needed after having been registered in the MBeanServer or after the registration has failed. |
void |
preDeregister()
Deprecated. Allows the MBean to perform any operations it needs before being de-registered by the MBean server. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Deprecated. Performs pre-registration initialization. |
void |
removeUserAuthenticationInfo(AuthInfo authinfo)
Deprecated. Removes user authentication information from this server. |
void |
setMaxActiveClientCount(int c)
Deprecated. Sets the maximum number of clients this GenericHttpConnectorServer can process concurrently. |
void |
setMBeanServer(MBeanServer newMBS)
Deprecated. Set the MBeanServer object to which incoming
requests are sent. |
void |
stop()
Deprecated. Stops this connector server. |
| Methods inherited from class com.sun.jdmk.comm.CommunicatorServer |
addNotificationListener, getHost, getMBeanServer, getNotificationInfo, getPort, getProtocol, getState, getStateString, isActive, removeNotificationListener, run, setPort, start, waitState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GenericHttpConnectorServer(int connectorType)
throws IllegalArgumentException
GenericHttpConnectorServer with the
default port.
The default port is protocol-specific: its value is defined by the
derived classes.
connectorType - Indicates the connector type. Possible values are:
CommunicatorServer.HTTP_TYPE or
CommunicatorServer.HTTPS_TYPE.
public GenericHttpConnectorServer(int connectorType,
int port)
throws IllegalArgumentException
GenericHttpConnectorServer with the
specified port.
connectorType - Indicates the connector type. Possible values are:
CommunicatorServer.HTTP_TYPE or
CommunicatorServer.HTTPS_TYPE.port - The port number.
public GenericHttpConnectorServer(int connectorType,
int port,
AuthInfo[] authInfoList)
throws IllegalArgumentException
GenericHttpConnectorServer with the
specified port and user authentication information list.
connectorType - Indicates the connector type.
Possible values are:
CommunicatorServer.HTTP_TYPE or
CommunicatorServer.HTTPS_TYPE.port - The port number.authInfoList - The user authentication information list.
public GenericHttpConnectorServer(int connectorType,
int port,
InetAddress bindAddr)
throws IllegalArgumentException
GenericHttpConnectorServer with the specified port.
connectorType - Indicates the connector type. Possible values are:
CommunicatorServer.HTTP_TYPE or CommunicatorServer.HTTPS_TYPE.port - The port number.bindAddr - The local InetAddress the server will bind to .
public GenericHttpConnectorServer(int connectorType,
int port,
AuthInfo[] authInfoList,
InetAddress bindAddr)
throws IllegalArgumentException
GenericHttpConnectorServer with the specified port and
user authentication information list.
connectorType - Indicates the connector type. Possible values are:
CommunicatorServer.HTTP_TYPE or CommunicatorServer.HTTPS_TYPE.port - The port number.authInfoList - The user authentication information list.bindAddr - The local InetAddress the server will bind to .| Method Detail |
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationpreRegister in class CommunicatorServerserver - The MBeanServer in which the MBean will be
registered.name - The object name of the MBean.
Exception - This exception should be caught by
the MBeanServer and re-thrown
as an MBeanRegistrationException.public void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistrationpostRegister in class CommunicatorServerregistrationDone - Indicates whether or not the MBean has been successfully registered
in the MBeanServer. The value false means that the registration phase has failed.
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationpreDeregister in class CommunicatorServerException - This exception should be caught by the MBean server and re-thrown
as an MBeanRegistrationException.public void postDeregister()
postDeregister in interface MBeanRegistrationpostDeregister in class CommunicatorServer
protected void doError(Exception e)
throws CommunicationException
doError in class CommunicatorServerCommunicationException
protected void doBind()
throws InterruptedException,
CommunicationException
doBind in class CommunicatorServerInterruptedException
CommunicationException
protected void doReceive()
throws InterruptedException,
CommunicationException
CommunicatorServerdoReceive() should block until a client is available.
If this method throws an exception, doProcess() is not
called but doUnbind() is called then run()
stops.
doReceive in class CommunicatorServerInterruptedException
CommunicationException
protected void doProcess()
throws InterruptedException,
CommunicationException
CommunicatorServerdoProcess() is called after doReceive():
it should process the requests of the incoming client.
If it throws an exception, doUnbind() is called and
run() stops.
doProcess in class CommunicatorServerInterruptedException
CommunicationException
protected void doUnbind()
throws InterruptedException,
CommunicationException
CommunicatorServerdoUnbind() is called whenever the connector goes
OFFLINE, except if doBind() has
thrown an exception.
doUnbind in class CommunicatorServerInterruptedException
CommunicationExceptionpublic void stop()
Has no effect if this HTTP connector server is
OFFLINE or STOPPING.
stop in interface CommunicatorServerMBeanstop in class CommunicatorServer
public void setMBeanServer(MBeanServer newMBS)
throws IllegalArgumentException,
IllegalStateException
CommunicatorServerMBeanServer object to which incoming
requests are sent. This must be either the MBean server in
which this connector is registered, or an
MBeanServerForwarder leading to that server. An
MBeanServerForwarder mbsf leads to an
MBean server mbs if
mbsf.getMBeanServer() is either mbs
or an MBeanServerForwarder leading to
mbs.
setMBeanServer in class CommunicatorServerIllegalStateException - This method has been invoked
while the communicator was ONLINE or STARTING.
IllegalArgumentException - if newMBS is neither
the MBean server in which this connector is registered nor an
MBeanServerForwarder leading to that server.public int getServedClientCount()
GenericHttpConnectorServer
since its creation.
GenericHttpConnectorServer
since its creation. This counter is not reset by the stop method.public int getActiveClientCount()
GenericHttpConnectorServer.
GenericHttpConnectorServer.public int getMaxActiveClientCount()
GenericHttpConnectorServer can process concurrently.
GenericHttpConnectorServer can process concurrently.
public void setMaxActiveClientCount(int c)
throws IllegalStateException
GenericHttpConnectorServer can process concurrently.
c - The number of clients.
IllegalStateException - This method has been invoked
while the communicator was ONLINE or STARTING.public String getLastConnectedClient()
InetAddress.
InetAddresspublic void addUserAuthenticationInfo(AuthInfo authinfo)
authinfo - The user authentication information.public void removeUserAuthenticationInfo(AuthInfo authinfo)
authinfo - The user authentication information.addUserAuthenticationInfo(com.sun.jdmk.comm.AuthInfo)public boolean isAuthenticationOn()
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||