mx4j.adaptor.http
Interface HttpAdaptorMBean

All Known Implementing Classes:
HttpAdaptor

public interface HttpAdaptorMBean

MBean of the HTTPAdapter

Version:
$Revision: 1.3 $
Author:
Carlos Quiroz

Method Summary
 void addAuthorization(java.lang.String username, java.lang.String password)
          Adds an authorization
 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()
          Returns the object being used as a processor
 ObjectName getProcessorName()
          Returns the ObjectName of the processor being used
 boolean isActive()
          Indicates whether the server's running
 void restart()
          Restarts the server.
 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 setProcessorName(ObjectName processorName)
          Sets the object name which will post process the XML result.
 void setSocketFactory(AdaptorServerSocketFactory factory)
          Sets the object which create the server sockets
 void setSocketFactoryName(java.lang.String factoryName)
          Sets the ObjectName of the factory for server sockets
 void start()
          Starts the server
 void stop()
          Stops the server
 

Method Detail

getPort

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

setPort

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

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

setHost

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

setSocketFactory

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

setSocketFactoryName

public void setSocketFactoryName(java.lang.String factoryName)
Sets the ObjectName of the factory for server sockets
Parameters:
factoryName - the ObjectName of the ServerSocket factory

setProcessor

public void setProcessor(ProcessorMBean processor)
Sets the object which will post process the XML results. The last value set between the setProcessor and setPostProcessorName will be the valid one
Parameters:
processor - a 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 setProcessor and setPostProcessorName will be the valid one. The MBean will be verified to be of instance HttpPostProcessor
Parameters:
processor - a processor object

getProcessor

public ProcessorMBean getProcessor()
Returns the object being used as a processor
Returns:
the processor object

getProcessorName

public ObjectName getProcessorName()
Returns the ObjectName of the processor being used
Returns:
processor objectname

getAuthenticationMethod

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

setAuthenticationMethod

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

addAuthorization

public void addAuthorization(java.lang.String username,
                             java.lang.String password)
Adds an authorization
Parameters:
username - authorized username
username - authorized password

isActive

public boolean isActive()
Indicates whether the server's running
Parameters:
true - if the server is working, false otherwise

start

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

stop

public void stop()
Stops the server

restart

public void restart()
             throws java.io.IOException
Restarts the server. Useful when changing the Server parameters