com.buildforge.services.client.api
Class SecureAPIClientConnection
java.lang.Object
com.buildforge.services.common.api.APIConnection
com.buildforge.services.client.api.APIClientConnection
com.buildforge.services.client.api.SecureAPIClientConnection
- All Implemented Interfaces:
- Localizer
public class SecureAPIClientConnection
- extends APIClientConnection
This is a secured subclass of the APIClientConnection
class that utilizes
SSL to encrypt communications between an API client and the server. In all other
ways, this class behaves identically to its parent class.
Field Summary |
static java.lang.String |
DEFAULT_HOST
The default hostname to use when none is provided. |
static int |
DEFAULT_PORT
The default port number to use when none is provided. |
Constructor Summary |
SecureAPIClientConnection()
Creates a new connection object for implementing the client side of
an API connection using default connection parameters. |
SecureAPIClientConnection(java.lang.String host)
Creates a new connection object for implementing the client side of
an API connection using the specified hostname and the default port. |
SecureAPIClientConnection(java.lang.String host,
int port)
Creates a new connection object for implementing the client side of
an API connection using the specified hostname and port. |
Methods inherited from class com.buildforge.services.client.api.APIClientConnection |
as, authToken, authUser, authUser, call, close, getInfo, getLocale, getTimeZone, logout, ping, render, request, setLocale, setTimeZone, translate, translate |
Methods inherited from class com.buildforge.services.common.api.APIConnection |
check, getProtocol, readRequest, setProtocol, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeFooter, writeHeader |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_HOST
public static final java.lang.String DEFAULT_HOST
- The default hostname to use when none is provided. The value of
this constant is "localhost".
- See Also:
- Constant Field Values
DEFAULT_PORT
public static final int DEFAULT_PORT
- The default port number to use when none is provided. The value of
this constant is 49150.
- See Also:
- Constant Field Values
SecureAPIClientConnection
public SecureAPIClientConnection()
throws java.io.IOException
- Creates a new connection object for implementing the client side of
an API connection using default connection parameters. This is exactly
equivalent to
#APIClientConnection(String, int)
using
DEFAULT_HOST
for the hostname and DEFAULT_PORT
for
the port number.
- Throws:
java.io.IOException
- if an I/O error occurs
SecureAPIClientConnection
public SecureAPIClientConnection(java.lang.String host)
throws java.io.IOException
- Creates a new connection object for implementing the client side of
an API connection using the specified hostname and the default port.
- Parameters:
hostname
- the hostname for the connection, or null to
use the default hostname
.
- Throws:
java.io.IOException
- if an I/O error occurs
SecureAPIClientConnection
public SecureAPIClientConnection(java.lang.String host,
int port)
throws java.io.IOException
- Creates a new connection object for implementing the client side of
an API connection using the specified hostname and port.
- Parameters:
hostname
- the hostname for the connection, or null to
use the default hostname
.port
- the port number for the connection, or non-positive value
to use the default port
.
- Throws:
java.io.IOException
- if an I/O error occurs