com.sun.jdmk.comm
Class HttpConnectorServer

java.lang.Object
  extended by com.sun.jdmk.comm.CommunicatorServer
      extended by com.sun.jdmk.comm.GenericHttpConnectorServer
          extended by com.sun.jdmk.comm.HttpConnectorServer
All Implemented Interfaces:
CommunicatorServerMBean, GenericHttpConnectorServerMBean, HttpConnectorServerMBean, Runnable, MBeanRegistration, NotificationBroadcaster

Deprecated. The JMX Remote API should be used in preference to the legacy Java DMK connector classes. This class may be removed in a future version of Java DMK. See JdmkLegacyConnector.

public class HttpConnectorServer
extends GenericHttpConnectorServer
implements HttpConnectorServerMBean

This class implements the server part of the HTTP/TCP connector. This class inherits most of its behavior. It performs only TCP-specific tasks:

See Also:
HttpConnectorClient

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
HttpConnectorServer()
          Deprecated. Constructs an HttpConnectorServer.
HttpConnectorServer(int port)
          Deprecated. Constructs an HttpConnectorServer.
HttpConnectorServer(int port, AuthInfo[] authInfoList)
          Deprecated. Constructs an HttpConnectorServer.
HttpConnectorServer(int port, AuthInfo[] authInfoList, InetAddress bindAddr)
          Deprecated. Constructs an HttpConnectorServer.
HttpConnectorServer(int port, InetAddress bindAddr)
          Deprecated. Constructs an HttpConnectorServer.
 
Method Summary
 String getProtocol()
          Deprecated. Returns the name of the protocol used.
 int getTimeout()
          Deprecated. Returns setting for Timeout.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Deprecated. Allows the MBean to perform any operations it needs before being registered in the MBean server.
 void setTimeout(int value)
          Deprecated. Enables/disables Timeout with the specified timeout, in milliseconds.
 
Methods inherited from class com.sun.jdmk.comm.GenericHttpConnectorServer
addUserAuthenticationInfo, doBind, doError, doProcess, doReceive, doUnbind, getActiveClientCount, getLastConnectedClient, getMaxActiveClientCount, getServedClientCount, isAuthenticationOn, postDeregister, postRegister, preDeregister, removeUserAuthenticationInfo, setMaxActiveClientCount, setMBeanServer, stop
 
Methods inherited from class com.sun.jdmk.comm.CommunicatorServer
addNotificationListener, getHost, getMBeanServer, getNotificationInfo, getPort, 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
 
Methods inherited from interface com.sun.jdmk.comm.GenericHttpConnectorServerMBean
getActiveClientCount, getLastConnectedClient, getMaxActiveClientCount, getServedClientCount, isAuthenticationOn, setMaxActiveClientCount
 
Methods inherited from interface com.sun.jdmk.comm.CommunicatorServerMBean
getHost, getPort, getState, getStateString, isActive, setPort, start, stop, waitState
 

Constructor Detail

HttpConnectorServer

public HttpConnectorServer()
Deprecated. 
Constructs an HttpConnectorServer.

Initializes this connector server with the default port (8081).


HttpConnectorServer

public HttpConnectorServer(int port)
Deprecated. 
Constructs an HttpConnectorServer.

Initializes this connector server with the specified port.

Parameters:
port - The port number.

HttpConnectorServer

public HttpConnectorServer(int port,
                           AuthInfo[] authInfoList)
Deprecated. 
Constructs an HttpConnectorServer.

Initializes this connector server with the specified port and user authentication information list.

Parameters:
port - The port number.
authInfoList - The user authentication information list.

HttpConnectorServer

public HttpConnectorServer(int port,
                           InetAddress bindAddr)
Deprecated. 
Constructs an HttpConnectorServer.

Initializes this connector server with the specified port.

Parameters:
port - The port number.
bindAddr - The local InetAddress the server will bind to.

HttpConnectorServer

public HttpConnectorServer(int port,
                           AuthInfo[] authInfoList,
                           InetAddress bindAddr)
Deprecated. 
Constructs an HttpConnectorServer.

Initializes this connector server with the specified port and user authentication information list.

Parameters:
port - The port number.
authInfoList - The user authentication information list.
bindAddr - The local InetAddress the server will bind to.
Method Detail

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Deprecated. 
Allows the MBean to perform any operations it needs before being registered in the MBean server. If the name of the HTTP connector server MBean is not specified, it is initialized with the default value: com.sun.jdmk.ServiceName.DOMAIN: com.sun.jdmk.ServiceName.HTTP_CONNECTOR_SERVER. If any exception is raised, the HTTP connector server MBean will not be registered in the MBean server.

Specified by:
preRegister in interface MBeanRegistration
Overrides:
preRegister in class GenericHttpConnectorServer
Parameters:
server - The MBeanServer in which the MBean will be registered.
name - The object name of the MBean.
Returns:
The name of the registered MBean.
Throws:
Exception - This exception should be caught by the MBeanServer and re-thrown as an MBeanRegistrationException.

getProtocol

public String getProtocol()
Deprecated. 
Returns the name of the protocol used.

Specified by:
getProtocol in interface CommunicatorServerMBean
Specified by:
getProtocol in class CommunicatorServer
Returns:
The string "http".

getTimeout

public int getTimeout()
Deprecated. 
Returns setting for Timeout.

0 returns implies that the option is disabled (i.e. timeout of infinity).

The default value for timeout is 60000 milliseconds.

Specified by:
getTimeout in interface HttpConnectorServerMBean
Returns:
The current value of the "Timeout" property.

setTimeout

public void setTimeout(int value)
                throws IllegalStateException
Deprecated. 
Enables/disables Timeout with the specified timeout, in milliseconds.

With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a InterruptedIOException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.

The default value for timeout is 60000 milliseconds.

Specified by:
setTimeout in interface HttpConnectorServerMBean
Parameters:
value - The new value of the property.
Throws:
IllegalStateException - This method has been invoked while the connector was ONLINE or STARTING.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.