Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.props

# Interface ServiceConnectionProperties

All Superinterfaces:
  `AttachmentProperties`, `BaseProperties`

All Known Subinterfaces:
  `BackupManager`, `IServiceProperties`, `MaintenanceManager`, `NBackupManager`, `ServiceManager`, `StatisticsManager`, `TraceManager`, `UserManager`

All Known Implementing Classes:
  `FBBackupManager`, `FBBackupManagerBase`, `FbImmutableServiceProperties`, `FBMaintenanceManager`, `FBNBackupManager`, `FBServiceManager`, `FbServiceProperties`, `FBStatisticsManager`, `FBStreamingBackupManager`, `FBTraceManager`, `FBUserManager`

public interface ServiceConnectionProperties extends AttachmentProperties
Properties for services.

Since:
  5
Author:
  Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default String`
  `getExpectedDb()`
  Gets the expected db (`isc_spb_expected_db`; defaults to `null`).
  `default String`
  `getServiceName()`
  Gets the service name (defaults to `"service_mgr"`).
  `default void`
  `setExpectedDb(String expectedDb)`
  Filename or alias of the database expected to be accessed by the service operation (`isc_spb_expected_db`).
  `default void`
  `setServiceName(String serviceName)`
  Sets the service name

  ### Methods inherited from interface org.firebirdsql.jaybird.props.AttachmentProperties

  `getAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEnableProtocol, getEncoding, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getServerName, getSocketBufferSize, getSocketFactory, getSoTimeout, getType, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEnableProtocol, setEncoding, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setServerName, setSocketBufferSize, setSocketFactory, setSoTimeout, setType, setUser, setWireCompression, setWireCrypt`

  ### Methods inherited from interface org.firebirdsql.jaybird.props.BaseProperties

  `connectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty`

- ## Method Details

  - ### getServiceName

    default String getServiceName()
    Gets the service name (defaults to `"service_mgr"`).
    Returns:
      database name
    See Also:
      - `setServiceName(String)`

  - ### setServiceName

    default void setServiceName(String serviceName)
    Sets the service name

    When `serverName` is `null`, then the value is taken as the URL of the service, and exact interpretation depends on the protocol implementation (`type`). Examples:

    - //localhost/ — PURE_JAVA, NATIVE (for NATIVE, this format is parsed and transformed to the next example; will fail on Firebird 2.5 and earlier)
    - localhost — NATIVE, PURE_JAVA,
    - //localhost:3051/ — PURE_JAVA, NATIVE (for NATIVE, this format is parsed and transformed to the next example; will fail on Firebird 2.5 and earlier)
    - //localhost/service_mgr — PURE_JAVA, NATIVE (for NATIVE, this format is parsed and transformed to the next example)
    - localhost:service_mgr — NATIVE, PURE_JAVA
    - //localhost:3051/service_mgr — PURE_JAVA, NATIVE (for NATIVE, this format is parsed and transformed to the next example)
    - localhost/3051:service_mgr — NATIVE, PURE_JAVA
    - service_mgr — NATIVE, EMBEDDED, PURE_JAVA (PURE_JAVA will use localhost as `serverName`, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)
    - xnet://service_mgr — NATIVE (EMBEDDED will behave as NATIVE, protocols like PURE_JAVA may attempt to connect to a server called `xnet`)
    - other Firebird `fbclient` connection URLs — NATIVE, (EMBEDDED will behave as NATIVE, protocols like PURE_JAVA may interpret the protocol name as a host name
    - Custom `type` implementations may support other URL formats

    Some protocols, for example PURE_JAVA, when `serverName` is not set, but `serviceName` doesn't seem to contain a host name, may default to attempting to connect to localhost with `serviceName` as the service.

    When `serverName` is set, the value is taken as the database path or alias. Examples:

    - service_mgr
    - empty string
    - `null`
    Parameters:
      `serviceName` - service name

  - ### getExpectedDb

    default String getExpectedDb()
    Gets the expected db (`isc_spb_expected_db`; defaults to `null`).
    Returns:
      expected database
    See Also:
      - `setExpectedDb(String)`

  - ### setExpectedDb

    default void setExpectedDb(String expectedDb)
    Filename or alias of the database expected to be accessed by the service operation (`isc_spb_expected_db`).

    For Firebird 3.0 and higher when using a non-default security database, so Firebird knows which database to use to authenticate. When using the default security database, this property does not need to be set.

    Some service implementations (e.g. `BackupManager`) may explicitly set this as part of their operation when its current value is `null`.

    Parameters:
      `expectedDb` - Expected database