Package ghidra.features.bsim.query.client

# Class FunctionDatabaseProxy

java.lang.Object
ghidra.features.bsim.query.client.FunctionDatabaseProxy

All Implemented Interfaces:
  `FunctionDatabase`, `AutoCloseable`

public class FunctionDatabaseProxy extends Object implements FunctionDatabase

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface ghidra.features.bsim.query.FunctionDatabase

  `FunctionDatabase.BSimError, FunctionDatabase.ConnectionType, FunctionDatabase.DatabaseNonFatalException, FunctionDatabase.ErrorCategory, FunctionDatabase.Status`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FunctionDatabaseProxy(URL url)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Close down (the connection with) the database
  `int`
  `compareLayout()`
  Return -1 if info layout version is earlier than current client expectation Return 1 if info layout version is later than current client expectation Return 0 if info version and client version are the same
  `FunctionDatabase.ConnectionType`
  `getConnectionType()`
  `DatabaseInformation`
  `getInfo()`
  `FunctionDatabase.BSimError`
  `getLastError()`
  If the last query failed to produce a response, use this method to recover the error message
  `LSHVectorFactory`
  `getLSHVectorFactory()`
  `BSimServerInfo`
  `getServerInfo()`
  Return the `server info object` for this database
  `FunctionDatabase.Status`
  `getStatus()`
  `String`
  `getURLString()`
  `String`
  `getUserName()`
  `boolean`
  `initialize()`
  Initialize (a connection with) the database.
  `QueryResponseRecord`
  `query(BSimQuery<?> query)`
  Send a query to the database.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.features.bsim.query.FunctionDatabase

  `changePassword, getOverviewFunctionsPerStage, getQueriedFunctionsPerStage, isPasswordChangeAllowed`

- ## Constructor Details

  - ### FunctionDatabaseProxy

    public FunctionDatabaseProxy(URL url) throws MalformedURLException
    Throws:
      `MalformedURLException`

- ## Method Details

  - ### getStatus

    public FunctionDatabase.Status getStatus()
    Specified by:
      `getStatus` in interface `FunctionDatabase`
    Returns:
      the status of the current connection with this database

  - ### getConnectionType

    public FunctionDatabase.ConnectionType getConnectionType()
    Specified by:
      `getConnectionType` in interface `FunctionDatabase`
    Returns:
      the type of connection

  - ### getUserName

    public String getUserName()
    Specified by:
      `getUserName` in interface `FunctionDatabase`
    Returns:
      username (being used to establish connection)

  - ### getLSHVectorFactory

    public LSHVectorFactory getLSHVectorFactory()
    Specified by:
      `getLSHVectorFactory` in interface `FunctionDatabase`
    Returns:
      factory the database is using to create LSHVector objects

  - ### getInfo

    public DatabaseInformation getInfo()
    Specified by:
      `getInfo` in interface `FunctionDatabase`
    Returns:
      an information object giving general characteristics and descriptions of this database

  - ### compareLayout

    public int compareLayout()
    Description copied from interface: `FunctionDatabase`
    Return -1 if info layout version is earlier than current client expectation Return 1 if info layout version is later than current client expectation Return 0 if info version and client version are the same
    Specified by:
      `compareLayout` in interface `FunctionDatabase`
    Returns:
      comparison of actual database layout with layout expected by client

  - ### getURLString

    public String getURLString()
    Specified by:
      `getURLString` in interface `FunctionDatabase`

  - ### getServerInfo

    public BSimServerInfo getServerInfo()
    Description copied from interface: `FunctionDatabase`
    Return the `server info object` for this database
    Specified by:
      `getServerInfo` in interface `FunctionDatabase`
    Returns:
      the server info object

  - ### initialize

    public boolean initialize()
    Description copied from interface: `FunctionDatabase`
    Initialize (a connection with) the database. If initialization is not successful, this routine will return false and an error description can be obtained using getLastError
    Specified by:
      `initialize` in interface `FunctionDatabase`
    Returns:
      true if the database ready for querying

  - ### close

    public void close()
    Description copied from interface: `FunctionDatabase`
    Close down (the connection with) the database
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `FunctionDatabase`

  - ### getLastError

    public FunctionDatabase.BSimError getLastError()
    Description copied from interface: `FunctionDatabase`
    If the last query failed to produce a response, use this method to recover the error message
    Specified by:
      `getLastError` in interface `FunctionDatabase`
    Returns:
      a String describing the error

  - ### query

    public QueryResponseRecord query(BSimQuery<?> query)
    Description copied from interface: `FunctionDatabase`
    Send a query to the database. The response is returned as a QueryResponseRecord. If this is null, an error has occurred and an error message can be obtained from getLastError
    Specified by:
      `query` in interface `FunctionDatabase`
    Parameters:
      `query` - an object describing the query
    Returns:
      the response object or null if there is an error