|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.protocols.rxa.ConnectionImpl
public abstract class ConnectionImpl
This class encapsulates the RXA library's Connection related objects
Field Summary | |
---|---|
static String |
AS400_PROXY
String for the Proxy parameter to be used if required for AS400 connection |
static String |
AS400_RUNPROG
String for the Secondary mechanism parameter for executing AS400 Programs |
static String |
AS400_SSL
String for the Enable or disable SSL parameter over an AS400 connection |
protected String |
as400Proxy
This parameter defines an AS400 proxy server if so required |
protected boolean |
as400RunProg
An optional Remote CLFC parameter that defines the type of command execution to use for an AS400 (i5/OS) connection |
protected boolean |
as400SSL
This parameter governs whether an SSL connection is enforced on the AS400 (i5/OS) connection |
protected String |
cmdArgsCharEncode
The character encoding to use for AS400 command line arguments |
static String |
COMMAND_RETURN_CODE
String for Command Return Code Parameter |
static String |
COMMAND_STD_ERROR
String for Command Error Parameter |
static String |
COMMAND_STD_OUTPUT
String for Command Output Parameter |
protected static String |
EMPTYSTRING
Empty String |
static String |
HANDLE_TEXT_FILE
String for the Parameter to handle as text file |
protected String |
hostName
The hostname (address) of the target machine. |
static String |
HOSTNAME
String for Hostname parameter of Remote Machine (target) |
protected int |
initial_timeout
An optional Remote CLFC parameter that defines a timeout period for the initial connection to the target system. |
static String |
INITIAL_TIMEOUT
String for the Timeout parameter of the connection |
protected String |
keystore
Full path to the file containing the keystore |
static String |
KEYSTORE
String for the keystore parameter to be used when connecting to the remote machine using the SSH protocol |
protected LogProxy |
lp
Used for logging |
protected String |
parentDirToStdin
Parent directory to the folder containing the stdin destination folder |
protected byte[] |
passphrase
The passphrase that protects your private key, in the keystore specified by the Keystore Path parameter above |
static String |
PASSPHRASE
String for the passphrase parameter for the keystore |
protected byte[] |
password
The password for the user (specified as Remote User) on the target machine. |
static String |
PASSWORD
String for the User password parameter to authenticate to the target |
static String |
PATH
String for the file path on the target |
protected int |
port
The port to use to connect to the target machine |
static String |
PORT
String for the port parameter to be used when establishing connection with target |
protected String |
randomDir
Path to random directory created |
static String |
RECURSIVE_SEARCH
String for the Timeout parameter of the connection |
protected Attribute |
rtnCodeAttr
The return code from the executed command indicating the success of the requested operation |
static String |
SOURCEPATH
String for the Source file path |
protected Attribute |
stdErrorAttr
The standard error from the executed command |
protected Attribute |
stdOutputAttr
The standard output from the executed command |
protected int |
timeout
The desired CPU timeout period in milliseconds |
static String |
TIMEOUT
String for the Timeout duration parameter for executing the command (ms) |
protected String |
userName
The name of a user with Administrative privileges on the target machine |
static String |
USERNAME
String for the username paremeter to be used when connecting to target |
Constructor Summary | |
---|---|
ConnectionImpl(LogProxy log)
ConnectionImpl Constructor |
Method Summary | |
---|---|
abstract com.ibm.tivoli.remoteaccess.RemoteAccess |
beginSession()
Begin a session with the target machine |
void |
createDir(String dir)
Create a directory on the target machine |
String |
createRandomDir(String p)
Create a random directory on the target machine |
void |
endSession()
End the session with the target machine |
String |
getHost()
Get the hostname of the target for the connection |
char |
getOSSeparator()
Return the character that the target uses to separate path information |
com.ibm.tivoli.remoteaccess.RemoteAccess |
getRXAProtocol()
Return the RXA Connection Object |
abstract String |
getType()
Return this connection type |
String |
getUser()
Get the username being used in the connection |
void |
initializeProps(Properties p)
Initialize the properties of the connection |
boolean |
isExists(String path)
Returns true/false to check a given file exists or not |
ArrayList<String> |
list(String path)
Retrieves the list of files |
void |
receiveFile(String remotepath,
String localpath)
Receives the specified file from the target machine to a specified destination on the local machine |
void |
removeDir(String dir)
Remove a directory on the target machine |
Entry |
runCommand(String c)
Run the specified command on the target machine |
void |
setCmdArgsCharEncode(String enc)
Sets encoding for the command arguments before executing the actual command |
void |
setHost(String s)
Set the hostname of the target with which to connect |
void |
setRXAProtocol(com.ibm.tivoli.remoteaccess.RemoteAccess remote)
Set the RXA connection object for this connection |
void |
setUser(String u)
Set the username to be used when connecting to the target |
void |
transferFile(String localPath,
String remotePath)
Transfer the specified file from the local machine to a specified destination on the remote target |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String hostName
protected String userName
protected byte[] password
protected byte[] passphrase
protected String cmdArgsCharEncode
protected String keystore
protected int timeout
protected int port
protected boolean as400SSL
protected String as400Proxy
protected boolean as400RunProg
protected int initial_timeout
public static final String COMMAND_RETURN_CODE
public static final String COMMAND_STD_OUTPUT
public static final String COMMAND_STD_ERROR
public static final String HOSTNAME
public static final String USERNAME
public static final String PORT
public static final String PASSWORD
public static final String PATH
public static final String SOURCEPATH
public static final String TIMEOUT
public static final String KEYSTORE
public static final String PASSPHRASE
public static final String AS400_SSL
public static final String AS400_PROXY
public static final String AS400_RUNPROG
public static final String HANDLE_TEXT_FILE
public static final String INITIAL_TIMEOUT
public static final String RECURSIVE_SEARCH
protected Attribute rtnCodeAttr
protected Attribute stdErrorAttr
protected Attribute stdOutputAttr
protected LogProxy lp
protected String parentDirToStdin
protected String randomDir
protected static final String EMPTYSTRING
Constructor Detail |
---|
public ConnectionImpl(LogProxy log)
log
- LogProxy for loggingMethod Detail |
---|
public void initializeProps(Properties p)
initializeProps
in interface Connection
p
- Properties object containing the configurable connection
attributespublic abstract com.ibm.tivoli.remoteaccess.RemoteAccess beginSession() throws RemoteConnectException
beginSession
in interface Connection
RemoteConnectException
public abstract String getType()
getType
in interface Connection
public void endSession()
endSession
in interface Connection
public Entry runCommand(String c) throws GeneralCLFCException
runCommand
in interface Connection
c
- String containing the command to be executed
GeneralCLFCException
public String createRandomDir(String p) throws RemoteConnectException, GeneralCLFCException
createRandomDir
in interface Connection
p
- The path to the parent directory where the random directory is
to be created
GeneralCLFCException
RemoteConnectException
public void createDir(String dir) throws GeneralCLFCException
createDir
in interface Connection
dir
- Path of the folder to be created
GeneralCLFCException
- if the folder cannot be successfully created on the targetpublic void removeDir(String dir) throws GeneralCLFCException
removeDir
in interface Connection
dir
- The path to the folder to be deleted
GeneralCLFCException
- if the folder cannot be successfully removed from the targetpublic void transferFile(String localPath, String remotePath) throws GeneralCLFCException
transferFile
in interface Connection
localPath
- Path to the source file on the local machineremotePath
- Path to where the file is to be stored on the remote machine
GeneralCLFCException
- if the transfer failspublic void receiveFile(String remotepath, String localpath) throws GeneralCLFCException
receiveFile
in interface Connection
localPath
- Path to the source file on the remote machineremotePath
- Path to where the file is to be stored on local machine
GeneralCLFCException
- if the transfer failspublic boolean isExists(String path) throws GeneralCLFCException
isExists
in interface Connection
path
- path on the file
GeneralCLFCException
public ArrayList<String> list(String path) throws GeneralCLFCException
list
in interface Connection
path
- path on the remote machine
GeneralCLFCException
public char getOSSeparator() throws RemoteConnectException
getOSSeparator
in interface Connection
RemoteConnectException
public com.ibm.tivoli.remoteaccess.RemoteAccess getRXAProtocol()
getRXAProtocol
in interface Connection
public void setHost(String s)
setHost
in interface Connection
s
- The hostname of the targetpublic String getHost()
getHost
in interface Connection
public void setUser(String u)
setUser
in interface Connection
u
- Usernamepublic String getUser()
getUser
in interface Connection
public void setRXAProtocol(com.ibm.tivoli.remoteaccess.RemoteAccess remote)
remote
- The protocol-specific connection objectpublic void setCmdArgsCharEncode(String enc)
setCmdArgsCharEncode
in interface Connection
enc
- encoding to be used
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |