com.buildforge.services.client.api
Class SecureAPIClientConnection

java.lang.Object
  extended by com.buildforge.services.common.api.APIConnection
      extended by com.buildforge.services.client.api.APIClientConnection
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.buildforge.services.common.text.Localizer
Localizer.Generic
 
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.
 
Method Summary
 
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
 

Field Detail

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
Constructor Detail

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