addAuthorization
public void addAuthorization(String username,
String password)
Adds an authorization pair as username/password
addCommandProcessor
public void addCommandProcessor(String path,
String processorClass)
Adds a command processor object by class
addCommandProcessor
public void addCommandProcessor(String path,
HttpCommandProcessor processor)
Adds a command processor object
getAuthenticationMethod
public String getAuthenticationMethod()
Authentication Method
getHost
public java.lang.String getHost()
Return the host name the server will be listening to. If null the server listen at the localhost
getPort
public int getPort()
Returns the port where the server is running on. Default is 8080
getProcessorName
public javax.management.ObjectName getProcessorName()
getRequestsCount
public long getRequestsCount()
Requests count
- The total of requests served so far
getStartDate
public Date getStartDate()
Starting date
- The date when the server was started
getVersion
public String getVersion()
Gets the HttpAdaptor version
isActive
public boolean isActive()
Indicates whether the server's running
removeCommandProcessor
public void removeCommandProcessor(String path)
Removes a command processor object by class
setAuthenticationMethod
public void setAuthenticationMethod(String method)
Sets the Authentication Method.
method
- none/basic/digest
setHost
public void setHost(java.lang.String host)
Sets the host name where the server will be listening
setPort
public void setPort(int port)
Sets the value of the server's port
port
- the new port's value
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
processor
- a Post processor object
setProcessorClass
public void setProcessorClass(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.tools.adaptor.http.ProcessorMBean and be MBean compliant
processorClass
- a Post processor object
setProcessorName
public void setProcessorName(javax.management.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
processorName
- The new processorName value
setProcessorNameString
public void setProcessorNameString(String processorName)
throws javax.management.MalformedObjectNameException
Sets the object name of the PostProcessor MBean. If ProcessorClass is set the processor will be created
processorName
- a Post processor object
setSocketFactory
public void setSocketFactory(AdaptorServerSocketFactory factory)
Sets the object which create the server sockets
factory
- the socket factory
setSocketFactoryName
public void setSocketFactoryName(javax.management.ObjectName factoryName)
Sets the factory's object name which will create the server sockets
factoryName
- the socket factory
setSocketFactoryNameString
public void setSocketFactoryNameString(String factoryName)
throws javax.management.MalformedObjectNameException
Sets the factory's object name which will create the server sockets
factoryName
- the socket factory
start
public void start()
throws IOException
Starts the server
stop
public void stop()
Stops the HTTP daemon