Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.marklogic.xcc
Class SecurityOptions

    java.lang.Object
      com.marklogic.xcc.SecurityOptions

    public class SecurityOptions

extends Object

This class contains the SSL security options to be used by secure XCC connections. Secure ContentSource objects

Constructor Summary
`SecurityOptions(SecurityOptions prototype)`
`SecurityOptions(SSLContext context)` Construct a new SecurityOptions instance with the specified SSL context.

Method Summary
`boolean` | `equals(Object o)` Returns true if the passed object is a SecurityOptions instance that has the same enabled ciphers and protocols, and references the same SSLContext instance.
`String[]` | `getEnabledCipherSuites()` Return the names of the SSL cipher suites which are to be enabled when new XCCS connections are created.
`String[]` | `getEnabledProtocols()` Return the names of the protocol versions which are to be enabled when new XCCS connections are created.
`SSLContext` | `getSslContext()` Return the SSL Context that will be used for new XCCS connections.
`int` | `hashCode()` Returns a computed hash based on the enabled cipher and protocol names, and the hashCode of the sslContext, if set.
`void` | `setEnabledCipherSuites(String[] enabledCipherSuites)` Set the cipher suites enabled when new XCCS connections are created.
`void` | `setEnabledProtocols(String[] enabledProtocols)` Set the protocol versions enabled when new XCCS connections are created.

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

Constructor Detail

### SecurityOptions

    public SecurityOptions(SSLContext context)

  Construct a new SecurityOptions instance with the specified SSL context.

  Parameters:
    `context` - The SSL context.

### SecurityOptions

    public SecurityOptions(SecurityOptions prototype)

Method Detail

### getEnabledProtocols

    public String[] getEnabledProtocols()

  Return the names of the protocol versions which are to be enabled when new XCCS connections are created. The returned array is a sorted copy of the protocols list; changes to it will not affect this object or anything that uses it.

  Returns:
    An array of protocols, or null if the SSLContext's defaults are to be used.
  See Also:
    `setEnabledProtocols(String[] enabledProtocols)`

### getSslContext

    public SSLContext getSslContext()

  Return the SSL Context that will be used for new XCCS connections.

  Returns:
    The SSLContext object.

### setEnabledProtocols

    public void setEnabledProtocols(String[] enabledProtocols)

  Set the protocol versions enabled when new XCCS connections are created. Following a successful call to this method, only protocols listed in the protocols parameter are enabled for use.

  Parameters:
    `enabledProtocols` - Names of all the protocols to enable.
  See Also:
    `getEnabledProtocols()`

### getEnabledCipherSuites

    public String[] getEnabledCipherSuites()

  Return the names of the SSL cipher suites which are to be enabled when new XCCS connections are created.

  Even if a suite has been enabled, it might never be used. (For example, the peer does not support it, the requisite certificates (and private keys) for the suite are not available, or an anonymous suite is enabled but authentication is required. The returned array is a sorted copy of the cipher suites list; changes to it will not affect this object or anything that uses it.

  Returns:
    An array of enabled cipher suite names, or null if the SSL context's defaults are to be used.
  See Also:
    `setEnabledCipherSuites(String[] enabledCipherSuites)`

### setEnabledCipherSuites

    public void setEnabledCipherSuites(String[] enabledCipherSuites)

  Set the cipher suites enabled when new XCCS connections are created. Following a successful call to this method, only suites listed in the suites parameter are enabled for use.

  See `getEnabledCipherSuites()` for more information on why a specific cipher suite may never be used on a connection.

  Parameters:
    `enabledCipherSuites` - Names of all the cipher suites to enable.
  See Also:
    `getEnabledCipherSuites()`

### hashCode

    public int hashCode()

  Returns a computed hash based on the enabled cipher and protocol names, and the hashCode of the sslContext, if set.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    a content-based hash code for this object.

### equals

    public boolean equals(Object o)

  Returns true if the passed object is a SecurityOptions instance that has the same enabled ciphers and protocols, and references the same SSLContext instance.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` - the reference object with which to compare.
  Returns:
    if this object is the same as the obj argument; false otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 MarkLogic Corporation, All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com