Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.ssh.cp.client.impl
Class SCPClientImpl

    java.lang.Object
      com.stc.connector.ssh.SSHProvider
          com.stc.connector.ssh.cp.client.impl.SCPClientImpl

All Implemented Interfaces:
  com.maverick.ssh.HostKeyVerification, SCPClient

    public class SCPClientImpl

extends SSHProvider
implements SCPClient

Field Summary

Fields inherited from class com.stc.connector.ssh.SSHProvider
`iSSHVer, mCFG, mInterface, mSSHClient`

Constructor Summary
`SCPClientImpl(SCP intf, java.util.Map aParams)`

Method Summary
`void` | `connect()` connect to the remote SSH server;
`void` | `disconnect()` disconnect the client from the remote SSH server;
`void` | `get()` get data from remote SSH server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`; Note, the remote could be a folder - in this case, if the configuration parameter `Recursive` is "Yes" - the folder hierarchy is copied to the local destination;
`byte[]` | `getPayload()` return the payload buffer - byte array;
`void` | `getRecursive()` same as get with configuration parameter `Recursive` set to "Yes"
`boolean` | `isConnected()` test if the client is connected to a remote SSH server;
`void` | `put()` the source file must be a local file and it must exists, the remote destination is the file to write to the remote path will be created if it does not exists
`void` | `putRecursive()` same as put with configuration parameter `Recursive` set to "Yes"
`boolean` | `reset()` internal life cycle methods reset the scp client such as discard payload buffer
`void` | `setPayload(byte[] newPayload)` set the payload buffer with `newPayload`
`void` | `terminate()` internal life cycle method;

Methods inherited from class com.stc.connector.ssh.SSHProvider
`connectWithAuthentication, getConfiguration, verifyHost`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SCPClientImpl

    public SCPClientImpl(SCP intf,
                         java.util.Map aParams)
                  throws java.lang.Exception

Throws:
  `java.lang.Exception`

Method Detail

### reset

    public boolean reset()
                  throws SCPException

  Description copied from interface: `SCPClient`
  internal life cycle methods reset the scp client such as discard payload buffer

  Specified by:
    `reset` in interface `SCPClient`
  Returns:
  Throws:
    `SCPException`

### terminate

    public void terminate()
                   throws SCPException

  Description copied from interface: `SCPClient`
  internal life cycle method;

  Specified by:
    `terminate` in interface `SCPClient`
  Throws:
    `SCPException`

### getPayload

    public byte[] getPayload()

  Description copied from interface: `SCPClient`
  return the payload buffer - byte array;

  Specified by:
    `getPayload` in interface `SCPClient`
  Returns:
    payload buffer;

### setPayload

    public void setPayload(byte[] newPayload)

  Description copied from interface: `SCPClient`
  set the payload buffer with `newPayload`

  Specified by:
    `setPayload` in interface `SCPClient`

### connect

    public void connect()
                 throws SCPException

  Description copied from interface: `SCPClient`
  connect to the remote SSH server;

  Specified by:
    `connect` in interface `SCPClient`
  Throws:
    `SCPException`

### disconnect

    public void disconnect()
                    throws SCPException

  Description copied from interface: `SCPClient`
  disconnect the client from the remote SSH server;

  Specified by:
    `disconnect` in interface `SCPClient`
  Throws:
    `SCPException`

### isConnected

    public boolean isConnected()
                        throws SCPException

  Description copied from interface: `SCPClient`
  test if the client is connected to a remote SSH server;

  Specified by:
    `isConnected` in interface `SCPClient`
  Returns:
    true if connected false otherwise;
  Throws:
    `SCPException`

### put

    public void put()
             throws SCPException

  the source file must be a local file and it must exists, the remote destination is the file to write to the remote path will be created if it does not exists

  Specified by:
    `put` in interface `SCPClient`
  Throws:
    `SCPException`

### putRecursive

    public void putRecursive()
                      throws SCPException

  Description copied from interface: `SCPClient`
  same as put with configuration parameter `Recursive` set to "Yes"

  Specified by:
    `putRecursive` in interface `SCPClient`
  Throws:
    `SCPException`

### get

    public void get()
             throws SCPException

  Description copied from interface: `SCPClient`
  get data from remote SSH server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`; Note, the remote could be a folder - in this case, if the configuration parameter `Recursive` is "Yes" - the folder hierarchy is copied to the local destination;

  Specified by:
    `get` in interface `SCPClient`
  Throws:
    `SCPException`

### getRecursive

    public void getRecursive()
                      throws SCPException

  Description copied from interface: `SCPClient`
  same as get with configuration parameter `Recursive` set to "Yes"

  Specified by:
    `getRecursive` in interface `SCPClient`
  Throws:
    `SCPException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD