com.jscape.filetransfer

## Class FileTransferSslHandshakeEvent

- java.lang.Object
- - java.util.EventObject
  - - com.jscape.filetransfer.FileTransferEvent
    - - com.jscape.filetransfer.FileTransferSslHandshakeEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class FileTransferSslHandshakeEvent
      extends FileTransferEvent

  A SSL handshake event. Provides information about current SSL connection in SSL-based transfers.
  Author:
    Alex Usun
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTransferSslHandshakeEvent(FileTransfer source, javax.net.ssl.HandshakeCompletedEvent baseEvent)` Creates a new event instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(FileTransferListener listener)` Accepts event via FileTransferListener.
    `java.lang.String` | `getCipherSuite()` Returns the cipher suite in use by the session which was produced by the handshake.
    `java.security.cert.Certificate[]` | `getLocalCertificates()` Returns the certificate(s) that were sent to the peer during handshaking.
    `java.security.Principal` | `getLocalPrincipal()` Returns the principal that was sent to the peer during handshaking.
    `javax.security.cert.X509Certificate[]` | `getPeerCertificateChain()` Returns the identity of the peer which was identified as part of defining the session.
    `java.security.cert.Certificate[]` | `getPeerCertificates()` Returns the identity of the peer which was established as part of defining the session.
    `java.security.Principal` | `getPeerPrincipal()` Returns the identity of the peer which was established as part of defining the session.
    `javax.net.ssl.SSLSession` | `getSession()` Returns the session that triggered this event.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.util.EventObject

      `getSource`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileTransferSslHandshakeEvent

          public FileTransferSslHandshakeEvent(FileTransfer source,
                                               javax.net.ssl.HandshakeCompletedEvent baseEvent)

      Creates a new event instance.
      Parameters:
        `source` - an event source
        `baseEvent` - a base event

  - ### Method Detail

    - #### getSession

          public javax.net.ssl.SSLSession getSession()

      Returns the session that triggered this event.
      Returns:
        the SSLSession for this handshake

    - #### getCipherSuite

          public java.lang.String getCipherSuite()

      Returns the cipher suite in use by the session which was produced by the handshake.
      Returns:
        the name of the cipher suite negotiated during this session

    - #### getLocalCertificates

          public java.security.cert.Certificate[] getLocalCertificates()

      Returns the certificate(s) that were sent to the peer during handshaking.
      Returns:
        an ordered array of certificates, with the local certificate first followed by any certificate authorities. If no certificates were sent, then null is returned

    - #### getPeerCertificates

          public java.security.cert.Certificate[] getPeerCertificates()

      Returns the identity of the peer which was established as part of defining the session.
      Returns:
        an ordered array of the peer certificates, with the peer's own certificate first followed by any certificate authorities. If no certificates were received, then null is returned

    - #### getPeerCertificateChain

          public javax.security.cert.X509Certificate[] getPeerCertificateChain()

      Returns the identity of the peer which was identified as part of defining the session.
      Returns:
        an ordered array of peer X.509 certificates, with the peer's own certificate first followed by any certificate authorities. If no certificates were received, then null is returned

    - #### getPeerPrincipal

          public java.security.Principal getPeerPrincipal()

      Returns the identity of the peer which was established as part of defining the session.
      Returns:
        the peer's principal. Returns an X500Principal of the end-entity certiticate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites. If no principal was received, then null is returned.

    - #### getLocalPrincipal

          public java.security.Principal getLocalPrincipal()

      Returns the principal that was sent to the peer during handshaking.
      Returns:
        the principal sent to the peer. Returns an X500Principal of the end-entity certificate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites. If no principal was sent, then null is returned.

    - #### accept

          public void accept(FileTransferListener listener)

      Accepts event via FileTransferListener.
      Specified by:
        `accept` in class `FileTransferEvent`
      Parameters:
        `listener` - the listener which receives event

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.util.EventObject`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved