TLSProfile (BEEP Core API)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.beepcore.beep.profile.tls
Class TLSProfile

    java.lang.Object
      |
      +--org.beepcore.beep.core.TuningProfile
            |
            +--org.beepcore.beep.profile.tls.TLSProfile

All Implemented Interfaces:
  Profile

public abstract class TLSProfile
extends TuningProfile
implements Profile

TLS provides encrypted and authenticated communication over a session. TLS is a tuning profile, a special set of profiles that affect an entire session. As a result, only one channel with the profile of TLS may be open per session.

See Also:
  `init(java.lang.String, org.beepcore.beep.profile.ProfileConfiguration)`, `Profile`, `Channel`

Field Summary
`static java.lang.String` | `URI` default URI of the channel to start to start a TLS channel

Constructor Summary
`TLSProfile()`

Method Summary
`static TLSProfile` | `getDefaultInstance()` factory method that returns an instance the default implementation.
`static TLSProfile` | `getInstance(java.lang.String provider)` factory method that returns an instance of the implementation given in the parameter.
`abstract StartChannelListener` | `init(java.lang.String uri, ProfileConfiguration config)` init sets the criteria for which an TLS connection is made when a TLS channel is started for a profile.
`abstract TCPSession` | `startTLS(TCPSession session)` start a channel for the TLS profile.

Methods inherited from class org.beepcore.beep.core.TuningProfile
`abort, begin, complete, disableIO, enableIO, reset, sendProfile, setLocalCredential, setPeerCredential, startChannel`

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

Field Detail

### URI

    public static final java.lang.String URI

  default URI of the channel to start to start a TLS channel

  See Also:
    Constant Field Values

Constructor Detail

### TLSProfile

    public TLSProfile()

Method Detail

### init

    public abstract StartChannelListener init(java.lang.String uri,
                                              ProfileConfiguration config)
                                       throws BEEPException

  init sets the criteria for which an TLS connection is made when a TLS channel is started for a profile. It should only be called once. For the properties, the initiator is defined as the peer who starts the channel for the TLS profile, the listener is the peer that receives the the channel start request, irregardless of which actually started the session.

  Each subclass that encapsulates an implementation has its own properties as to what it needs to initialise. See the individual implementations for their properties.

  Specified by:
    `init` in interface `Profile`
  Parameters:
    `uri` - used to start a channel with TLS protection
    `config` - used to specify the parameters for sessions protected by this profile's version of TLS. In other words, if you want another set of paramters, you must either recall this method or create another instance of a `TLSProfile`.
  Returns:
    The corresponding `StartChannelListener` for the specified uri.
  Throws:
    `BEEPException`

### startTLS

    public abstract TCPSession startTLS(TCPSession session)
                                 throws BEEPException

  start a channel for the TLS profile. Besides issuing the channel start request, it also performs the initiator side chores necessary to begin encrypted communication using TLS over a session. Parameters regarding the type of encryption and authentication are specified using the profile configuration passed to the `init` method Upon returning, all traffic over the session will be entrusted as per these parameters.

  Parameters:
    `session` - the session to encrypt communcation for
  Returns:
    new `TCPSession` with TLS negotiated.
  Throws:
    `BEEPException` - an error occurs during the channel start request or the TLS handshake (such as trying to negotiate an anonymous connection with a peer that doesn't support an anonymous cipher suite).
  See Also:
    `profile configuration`

### getDefaultInstance

    public static TLSProfile getDefaultInstance()
                                         throws BEEPException

  factory method that returns an instance the default implementation.

    `BEEPException`

### getInstance

    public static TLSProfile getInstance(java.lang.String provider)
                                  throws BEEPException

  factory method that returns an instance of the implementation given in the parameter. As of now, only one is supported, "PureTLS" returns an instance of TLSProfilePureTLS. If the provider is unknown, it tries to load a class of that name and returns.

  Parameters:
    `provider` - implementation to use.
    `BEEPException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.