|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetapp.manage.NaServer
A class used to connect to servers and invoke APIs.
| Field Summary | |
static int |
HOSTSEQUIV
Deprecated. As of SDK version 1.4 |
static int |
LOGIN_PASSWORD
Deprecated. As of SDK version 1.4 |
static int |
SERVER_TYPE_AGENT
|
static int |
SERVER_TYPE_DFM
|
static int |
SERVER_TYPE_FILER
|
static int |
SERVER_TYPE_NETCACHE
|
static int |
STYLE_HOSTSEQUIV
|
static int |
STYLE_LOGIN_PASSWORD
|
static int |
STYLE_RPC
|
static int |
TRANSPORT_TYPE_HTTP
|
static int |
TRANSPORT_TYPE_HTTPS
|
| Constructor Summary | |
NaServer(java.net.InetAddress serverAddr)
Create a server API object with server type SERVER_TYPE_FILER and API version 1.0. |
|
NaServer(java.net.InetAddress serverAddr,
int majorVersion,
int minorVersion)
Create a server API object with server type SERVER_TYPE_FILER |
|
NaServer(java.lang.String serverName)
Create a server API object with server type SERVER_TYPE_FILER and API version 1.0. |
|
NaServer(java.lang.String serverName,
int majorVersion,
int minorVersion)
Create a server API object with server type SERVER_TYPE_FILER |
|
| Method Summary | |
void |
close()
Close any connections used by this object. |
int |
getPort()
Get the TCP port used for API invocations on the server. |
int |
getServerType()
Get the server type, which is one of the SERVER_TYPE_ values. |
int |
getStyle()
Get the current authentication style. |
int |
getTimeout()
Get the connection timeout value in seconds for the current server context. |
int |
getTransportType()
Get the transport type, which is one of the TRANSPORT_TYPE_ values. |
NaElement |
getXMLParseInput(java.lang.String args)
Parses the given API request in the form of XML and builds an NaElement of it. |
NaElement |
invokeElem(NaElement xi)
Invoke a single API request. |
void |
setAdminUser(java.lang.String login,
java.lang.String password)
Set the login and password used for authenticating when an API is invoked. |
void |
setApiVersion(int majorVersion,
int minorVersion)
Set the API version for requests. |
void |
setKeepAliveEnabled(boolean enabled)
Turn HTTP keep alives on or off. |
void |
setPort(int tcpPort)
Set the TCP port used for API invocations on the server. |
void |
setServerType(int serverType)
Set the URI and TCP port appropriate for the given server type. |
void |
setSnoop(int level)
Set the snoop (debugging) level. |
void |
setStyle(int style)
Set the authentication style for subsequent API authentications. |
void |
setTimeout(int timeout)
Set the connection timeout value in seconds for the current server context. |
void |
setTransportType(int transportType)
Set the transport type. |
void |
setVfilerTunneling(java.lang.String vfiler)
Set the name of the vfiler on which the Data ONTAP API commands need to be invoked. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SERVER_TYPE_FILER
public static final int SERVER_TYPE_NETCACHE
public static final int SERVER_TYPE_AGENT
public static final int SERVER_TYPE_DFM
public static final int TRANSPORT_TYPE_HTTP
public static final int TRANSPORT_TYPE_HTTPS
public static final int STYLE_LOGIN_PASSWORD
public static final int STYLE_HOSTSEQUIV
public static final int STYLE_RPC
public static final int LOGIN_PASSWORD
public static final int HOSTSEQUIV
| Constructor Detail |
public NaServer(java.net.InetAddress serverAddr)
serverAddr - The IP address(IPv4 or IPv6) of the API server.
public NaServer(java.lang.String serverName)
throws java.net.UnknownHostException
serverName - The name of the API server.
java.net.UnknownHostException - if the hostname is not known.
public NaServer(java.net.InetAddress serverAddr,
int majorVersion,
int minorVersion)
serverAddr - The IP address(IPv4 or IPv6) of the API server.majorVersion - The major API version number required, for
example "1" if version 1.0 is required.minorVersion - The minor API version number required, for
example "0" if version 1.0 is required.
For DataFabric Manager APIs, pass 1.0 as the major and minor version numbers.
public NaServer(java.lang.String serverName,
int majorVersion,
int minorVersion)
throws java.net.UnknownHostException
serverName - The name of the API server.majorVersion - The major API version number required, for
example "1" if version 1.0 is required.minorVersion - The minor API version number required, for
example "0" if version 1.0 is required.
For DataFabric Manager APIs, pass 1.0 as the major and minor version numbers.
java.net.UnknownHostException - if the hostname is not known.| Method Detail |
public void setApiVersion(int majorVersion,
int minorVersion)
majorVersion - The major API version number required, for
example "1" if version 1.0 is required.minorVersion - The minor API version number required, for
example "0" if version 1.0 is required.
For DataFabric Manager APIs, pass 1.0 as the major and minor version numbers.
public void close()
public void setKeepAliveEnabled(boolean enabled)
enabled - Set to true to turn on keep alives.public void setPort(int tcpPort)
Following are the default ports on the storage system used for Data ONTAP API communication:
HTTP transport - 80
HTTPS transport - 443
Following are the default ports on the server for DataFabric Manager API communication:
HTTP transport - 8088
HTTPS transport - 8488
Use the above port numbers as input to this API if the server has default port settings.
tcpPort - The TCP server port to use.public int getPort()
public void setTimeout(int timeout)
Sets a connection timeout for the following actions:
Establishing a connection with the server.
Reading data from the server socket used for API communication.
timeout - The timeout value in seconds and should be
zero or a positive number. If it is non-zero, the server uses non-blocking socket connection. If it is zero, the server uses blocking connection, which is the default behavior.
public int getTimeout()
public int getServerType()
public void setServerType(int serverType)
serverType - The type of API server. Should be one of
the NaServer.SERVER_TYPE_ values. The
default on construction is SERVER_TYPE_FILER.
java.lang.IllegalArgumentException - if server type is not valid.public int getTransportType()
public void setTransportType(int transportType)
After setting the transport type, call the setPort() to set the port number used for that transport type.
transportType - The type of transport. Should be one of
the NaServer.TRANSPORT_TYPE_ values.
java.lang.IllegalArgumentException - if transport is not valid.
public void setAdminUser(java.lang.String login,
java.lang.String password)
login - The login name (often "root").password - The password.public void setStyle(int style)
style - The style, must be one of:
NaServer.STYLE_LOGIN_PASSWORD
NaServer.STYLE_HOSTSEQUIV
NaServer.STYLE_RPC NaServer.STYLE_RPC and NaServer.STYLE_HOSTSEQUIV styles are applicable for Data ONTAP APIs only.
java.lang.IllegalArgumentException - if style is not valid.public void setSnoop(int level)
level - 0 (the default) means no debugging.
-1 means to print the raw XML input and output.public int getStyle()
public NaElement invokeElem(NaElement xi)
throws java.io.IOException,
NaAuthenticationException,
NaAPIFailedException,
NaProtocolException
xi - The API element.
java.io.IOException - if there is a communication problem
NaAuthenticationException - if the login was not accepted
NaAPIFailedException - if the server returned a failure
result.
NaProtocolException - if there is a protocol problem
public NaElement getXMLParseInput(java.lang.String args)
throws java.io.IOException,
org.xml.sax.SAXException,
NaProtocolException
args - XML input string
java.io.IOException
org.xml.sax.SAXException
NaProtocolExceptionpublic java.lang.String toString()
public void setVfilerTunneling(java.lang.String vfiler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||