|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cri.xcat.api.Connection
public class Connection
This class contains the information needed to make a valid SSL socket
connection to an xCAT daemon. By default, the hostname of the xCAT daemon is
set to
| Constructor Summary | |
|---|---|
Connection()
Create a new connection to an xCAT daemon using hostname of "localhost" port of "3001", and the default xCAT certificate files: "ca.pem" & "client-cred.pem" located in the default xCAT directory. |
|
Connection(java.lang.String hostname,
int port)
Create a new connection to an xCAT daemon with the hostname and port specified. |
|
Connection(java.lang.String hostname,
int port,
java.io.File[] certificateFiles)
Create a new connection to an xCAT daemon with the hostname and port specified, and adds the security information from the security files specified. |
|
| Method Summary | |
|---|---|
void |
addCertificateFile(java.io.File certFile)
Adds the certificate file security information to the SSL client. |
javax.net.ssl.SSLSocket |
createSocket()
Creates a SSL socket from the SSLClient. |
java.lang.String |
getHostname()
Gets the host name of the server running the xCAT daemon. |
int |
getPort()
Gets the port number of which the xCAT daemon is listening for incoming requests. |
void |
setHostname(java.lang.String hostname)
Sets the host name of the server running the xCAT daemon. |
void |
setPort(int port)
Sets the port number of which the xCAT daemon is listening for incoming requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Connection()
throws java.security.GeneralSecurityException,
java.io.IOException
java.io.IOException - If there was an error creating a SSLClient
java.security.GeneralSecurityException - If there was an error creating a SSLClientSSLClient
public Connection(java.lang.String hostname,
int port)
throws java.security.GeneralSecurityException,
java.io.IOException
This connection will also attempt to locate the
hostname - The host name of the xcatd instance.port - The port that xcatd is listening on.
java.io.IOException - If there was an error creating a SSLClient or the default
certificate files were not found.
java.security.GeneralSecurityException - If there was an error creating a SSLClientSSLClient
public Connection(java.lang.String hostname,
int port,
java.io.File[] certificateFiles)
throws java.security.GeneralSecurityException,
java.io.IOException
hostname - The host name of the xcatd instance.port - The port that xcatd is listening on.certificateFiles - An array of files that contain the certificate security
information needed to connect to the xCAT server.
java.io.IOException - If there was an error creating a SSLClient or the default
certificate files were not found.
java.security.GeneralSecurityException - If there was an error creating a SSLClientSSLClient| Method Detail |
|---|
public void addCertificateFile(java.io.File certFile)
throws java.io.IOException,
java.security.GeneralSecurityException
This method allows the user to specify the certificate files that are required to connect to the xCAT server.
certFile - The certificate file used to create a SSL connection to
the xCAT server.
java.io.IOException - Exception thrown if there was a problem with IO when
accessing the file.
java.security.GeneralSecurityExceptionSSLClientpublic java.lang.String getHostname()
public int getPort()
public void setHostname(java.lang.String hostname)
hostname - the host name of the server running the xCAT daemonpublic void setPort(int port)
Port range must be from 1 to 65535.
port - the port number of which the xCAT daemon is listening for
incoming requests
public javax.net.ssl.SSLSocket createSocket()
throws java.io.IOException
java.io.IOExceptionSSLClient
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||