org.fax4j.spi.http.CommonHTTPClientConfiguration Maven / Gradle / Ivy
package org.fax4j.spi.http;
/**
* This is the common HTTP client configuration.
*
* @author Sagie Gur-Ari
* @version 1.02
* @since 0.20c
*/
public class CommonHTTPClientConfiguration implements HTTPClientConfiguration
{
/**The host name*/
private String hostName;
/**The port*/
private int port;
/**True to use SSL (HTTPS), false for simple HTTP*/
private boolean ssl;
/**
* This class holds the configuration constants.
*
* @author Sagie Gur-Ari
* @version 1.01
* @since 0.20c
*/
public static class HTTPClientConfigurationConstants
{
/**
* This is the class constructor.
*/
protected HTTPClientConfigurationConstants()
{
super();
}
/**The host name property key*/
public static final String HOST_NAME_PROPERTY_KEY="org.fax4j.spi.http.host.name";
/**The port property key*/
public static final String PORT_PROPERTY_KEY="org.fax4j.spi.http.port";
/**The SSL property key*/
public static final String SSL_PROPERTY_KEY="org.fax4j.spi.http.ssl";
}
/**
* This is the class constructor.
*/
public CommonHTTPClientConfiguration()
{
super();
//set defaults
this.setPort(80);
this.setSSL(false);
}
/**
* This function returns the host name.
*
* @return The host name
*/
public final String getHostName()
{
return this.hostName;
}
/**
* This function sets the host name.
*
* @param hostName
* The new value for the host name
*/
public final void setHostName(String hostName)
{
this.hostName=hostName;
}
/**
* This function returns the port.
*
* @return The port
*/
public final int getPort()
{
return this.port;
}
/**
* This function sets the port.
*
* @param port
* The new value for the port
*/
public final void setPort(int port)
{
this.port=port;
}
/**
* This function returns the SSL flag value.
*
* @return The SSL flag value
*/
public final boolean isSSL()
{
return this.ssl;
}
/**
* This function sets the SSL flag value.
*
* @param ssl
* The new value for the SSL flag value
*/
public final void setSSL(boolean ssl)
{
this.ssl=ssl;
}
}