Class Server

java.lang.Object
mindsdb.models.Project
mindsdb.services.Server

public class Server extends Project
The Server class extends the Project class and provides various services such as managing databases, ML engines, ML handlers, data handlers, agents, and skills. It also provides methods to interact with these services.
  • Field Details

    • databases

      public final Databases databases
      The Databases service for managing databases.
    • mlEngines

      public final MLEngines mlEngines
      The MLEngines service for managing machine learning engines.
    • mlHandlers

      public final MLHandlers mlHandlers
      The MLHandlers service for managing machine learning handlers.
    • dataHandlers

      public final DataHandlers dataHandlers
      The DataHandlers service for managing data handlers.
    • agents

      public final Agents agents
      The Agents service for managing agents.
    • skills

      public final Skills skills
      The Skills service for managing skills.
    • projects

      public final Projects projects
      The Projects service for managing projects.
  • Constructor Details

    • Server

      public Server(RestAPI api)
      Constructs a new Server instance with the specified RestAPI.
      Parameters:
      api - The RestAPI instance to be used by the server.
  • Method Details

    • status

      public com.google.gson.JsonObject status()
      Get the status of the server
      Returns:
      JsonObject with the server status
    • toString

      public String toString()
      Overrides:
      toString in class Project
    • getProject

      public Project getProject()
      Get default 'mindsdb' project
      Returns:
      Project
    • getProject

      public Project getProject(String name)
      Get A project
      Parameters:
      name - Name of the project
      Returns:
      Project
    • listProjects

      public List<Project> listProjects()
      List all projects
      Returns:
      List of projects
    • createProject

      public Project createProject(String name)
      Create a project
      Parameters:
      name - Name of the project
      Returns:
      Project
    • dropProject

      public void dropProject(String name)
      Drop a project
      Parameters:
      name - Name of the project
    • listMLEngines

      public List<MLEngine> listMLEngines()
      List all ML engines
      Returns:
      List of ML engines
    • getMLEngine

      public MLEngine getMLEngine(String name)
      Get an ML engine by name
      Parameters:
      name - Name of the ML engine
      Returns:
      MLEngine
    • createMLEngine

      public MLEngine createMLEngine(String name, Handler handler, Map<String,String> connectionData)
      Create an ML engine
      Parameters:
      name - - Name of the ML engine
      handler - - Handler object
      connectionData - - Connection data
      Returns:
      MLEngine
    • createMLEngine

      public MLEngine createMLEngine(String name, String handlerName, Map<String,String> connectionData)
      Create an ML engine
      Parameters:
      name - - Name of the ML engine
      handlerName - - Name of the handler
      connectionData - - Connection data
      Returns:
      MLEngine
    • createMLEngine

      public MLEngine createMLEngine(String name, Handler handler)
      Create an ML engine
      Parameters:
      name - Name of the ML engine
      handler - Handler object
      Returns:
      MLEngine
    • createMLEngine

      public MLEngine createMLEngine(String name, String handlerName)
      Create an ML engine
      Parameters:
      name - Name of the ML engine
      handlerName - Name of the handler
      Returns:
      MLEngine
    • dropMLEngine

      public void dropMLEngine(String name)
      Drop an ML engine
      Parameters:
      name - Name of the ML engine
    • listMLHandlers

      public List<Handler> listMLHandlers()
      List all ML handlers
      Returns:
      List of ML handlers
    • getMLHandler

      public Handler getMLHandler(String name)
      Get an ML handler by name
      Parameters:
      name - Name of the ML handler
      Returns:
      Handler
    • listDataHandlers

      public List<Handler> listDataHandlers()
      List all data handlers
      Returns:
      List of data handlers
    • getDataHandler

      public Handler getDataHandler(String name)
      Get a data handler by name
      Parameters:
      name - Name of the data handler
      Returns:
      Handler
    • listDatabases

      public List<Database> listDatabases()
      List all databases
      Returns:
      List of databases
    • getDatabase

      public Database getDatabase(String name)
      Get a database by name
      Parameters:
      name - Name of the database
      Returns:
      Database
    • createDatabase

      public Database createDatabase(String name, String engine, Map<String,String> connectionArgs)
      Create a database
      Parameters:
      name - Name of the database
      engine - Engine object
      connectionArgs - Connection arguments
      Returns:
      Database
    • createDatabase

      public Database createDatabase(String name, Handler engine, Map<String,String> connectionArgs)
      Create a database
      Parameters:
      name - Name of the database
      engine - Engine object
      connectionArgs - Connection arguments
      Returns:
      Database
    • dropDatabase

      public void dropDatabase(String name)
      Drop a database
      Parameters:
      name - Name of the database
    • listSkills

      public List<Skill> listSkills()
      List all skills
      Returns:
      List of skills
    • getSkill

      public Skill getSkill(String name)
      Get a skill by name
      Parameters:
      name - Name of the skill
      Returns:
      Skill
    • createSkill

      public Skill createSkill(String name, String type, Map<String,Object> params)
      Create a skill
      Parameters:
      name - Name of the skill
      type - Type of the skill
      params - Parameters of the skill
      Returns:
      Skill
    • updateSkill

      public Skill updateSkill(String name, Skill updateSkill)
      Update a skill
      Parameters:
      name - Name of the skill
      updateSkill - Skill object
      Returns:
      Skill
    • dropSkill

      public void dropSkill(String name)
      Drop a skill
      Parameters:
      name - Name of the skill