mx4j.adaptor.http
Interface HttpAdaptorMBean

All Known Implementing Classes:
HttpAdaptor

public interface HttpAdaptorMBean

MBean interface.

Version:
$Revision: 1.16 $
Author:
Carlos Quiroz

Method Summary
 void addAuthorization(java.lang.String username, java.lang.String password)
          Adds an authorization pair as username/password
 void addCommandProcessor(java.lang.String path, HttpCommandProcessor processor)
          Adds a command processor object
 void addCommandProcessor(java.lang.String path, java.lang.String processorClass)
          Adds a command processor object by class
 java.lang.String getAuthenticationMethod()
          Authentication Method
 java.lang.String getHost()
          Return the host name the server will be listening to.
 int getPort()
          Returns the port where the server is running on.
 ProcessorMBean getProcessor()
           
 ObjectName getProcessorName()
           
 long getRequestsCount()
          Requests count
 java.util.Date getStartDate()
          Starting date
 java.lang.String getVersion()
          Gets the HttpAdaptor version
 boolean isActive()
          Indicates whether the server's running
 void removeCommandProcessor(java.lang.String path)
          Removes a command processor object by class
 void setAuthenticationMethod(java.lang.String method)
          Sets the Authentication Method.
 void setHost(java.lang.String host)
          Sets the host name where the server will be listening
 void setPort(int port)
          Sets the value of the server's port
 void setProcessor(ProcessorMBean processor)
          Sets the object which will post process the XML results.
 void setProcessorClass(java.lang.String processorClass)
          Sets the classname of the object which will post process the XML results.
 void setProcessorName(ObjectName processorName)
          Sets the object name which will post process the XML result.
 void setProcessorNameString(java.lang.String processorName)
          Sets the object name of the PostProcessor MBean.
 void setSocketFactory(AdaptorServerSocketFactory factory)
          Sets the object which create the server sockets
 void setSocketFactoryName(ObjectName factoryName)
          Sets the factory's object name which will create the server sockets
 void setSocketFactoryNameString(java.lang.String factoryName)
          Sets the factory's object name which will create the server sockets
 void start()
          Starts the server
 void stop()
          Stops the HTTP daemon
 

Method Detail

setPort

public void setPort(int port)
Sets the value of the server's port
Parameters:
port - the new port's value

getPort

public int getPort()
Returns the port where the server is running on. Default is 8080
Returns:
HTTPServer's port

setHost

public void setHost(java.lang.String host)
Sets the host name where the server will be listening
Parameters:
host - Server's host

getHost

public java.lang.String getHost()
Return the host name the server will be listening to. If null the server listen at the localhost
Returns:
the current hostname

setAuthenticationMethod

public void setAuthenticationMethod(java.lang.String method)
Sets the Authentication Method.
Parameters:
method - none/basic/digest

getAuthenticationMethod

public java.lang.String getAuthenticationMethod()
Authentication Method
Returns:
authentication method

setProcessor

public void setProcessor(ProcessorMBean processor)
Sets the object which will post process the XML results. The last value set between the setPostProcessor and setPostProcessorName will be the valid one
Parameters:
processor - a Post processor object

setProcessorClass

public void setProcessorClass(java.lang.String processorClass)
Sets the classname of the object which will post process the XML results. The adaptor will try to build the object and use the processor name ObjectName to register it The class name has to implements mx4j.adaptor.http.ProcessorMBean and be MBean compliant
Parameters:
processor - a Post processor object

setProcessorNameString

public void setProcessorNameString(java.lang.String processorName)
                            throws MalformedObjectNameException
Sets the object name of the PostProcessor MBean. If ProcessorClass is set the processor will be created
Parameters:
processor - a Post processor object

setProcessorName

public void setProcessorName(ObjectName processorName)
Sets the object name which will post process the XML result. The last value set between the setPostProcessor and setPostProcessorName will be the valid one. The MBean will be verified to be of instance HttpPostProcessor
Parameters:
processorName - The new processorName value

getProcessor

public ProcessorMBean getProcessor()

getProcessorName

public ObjectName getProcessorName()

setSocketFactory

public void setSocketFactory(AdaptorServerSocketFactory factory)
Sets the object which create the server sockets
Parameters:
factory - the socket factory

setSocketFactoryName

public void setSocketFactoryName(ObjectName factoryName)
Sets the factory's object name which will create the server sockets
Parameters:
factory - the socket factory

setSocketFactoryNameString

public void setSocketFactoryNameString(java.lang.String factoryName)
                                throws MalformedObjectNameException
Sets the factory's object name which will create the server sockets
Parameters:
factory - the socket factory

isActive

public boolean isActive()
Indicates whether the server's running
Returns:
The active value

getStartDate

public java.util.Date getStartDate()
Starting date
Returns:
The date when the server was started

getRequestsCount

public long getRequestsCount()
Requests count
Returns:
The total of requests served so far

getVersion

public java.lang.String getVersion()
Gets the HttpAdaptor version
Returns:
HttpAdaptor's version

addCommandProcessor

public void addCommandProcessor(java.lang.String path,
                                HttpCommandProcessor processor)
Adds a command processor object

addCommandProcessor

public void addCommandProcessor(java.lang.String path,
                                java.lang.String processorClass)
Adds a command processor object by class

removeCommandProcessor

public void removeCommandProcessor(java.lang.String path)
Removes a command processor object by class

start

public void start()
           throws java.io.IOException
Starts the server

stop

public void stop()
Stops the HTTP daemon

addAuthorization

public void addAuthorization(java.lang.String username,
                             java.lang.String password)
Adds an authorization pair as username/password


Copyright © 2001-2002 MX4J Team. All Rights Reserved.