com.tibco.tea.agent.server

## Class TeaAgentServlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.eclipse.jetty.websocket.servlet.WebSocketServlet
      - - com.tibco.tea.agent.server.TeaAgentServlet

- All Implemented Interfaces:
    Serializable, Thread.UncaughtExceptionHandler, javax.servlet.Servlet, javax.servlet.ServletConfig

      public abstract class TeaAgentServlet
      extends org.eclipse.jetty.websocket.servlet.WebSocketServlet
      implements Thread.UncaughtExceptionHandler

  TeaAgent that can be registered in a Servlet container.

  Servlets expects the following init parameters:

  name
    Name of the agent type as string
  version
    Version of the agent type as string
  agent-info
    String providing information about the agent
  enable-metrics
    Boolean indicating if the agent VM metrics should be enabled
  static-resources-location
    location on disk of the static resources server by this agent

  To control the instances that are registered to the agent must override the method `getObjectInstances()` to return an array of instances that need to be registered.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TeaAgentServlet()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `autoRegisterAgent(String serverURL, String agentURL)`
    `void` | `autoRegisterAgent(String agentName, String serverURL, String agentURL)`
    `void` | `configure(org.eclipse.jetty.websocket.servlet.WebSocketServletFactory factory)`
    `TeaPersistence` | `getPersistence()` Get the Tea Persistence
    `void` | `init()`
    `void` | `registerSolution(TeaSolution solution)` Register a solution into the coreAgentObjectType
    `void` | `registerSolutions(TeaSolution... solution)` Register solutions into the coreAgentObjectType
    `void` | `setExposePythonAPI(Boolean value)`
    `void` | `uncaughtException(Thread t, Throwable throwable)`
    `void` | `unregisterAgent(String serverURL)`
    `void` | `unregisterSolution(String solutionName)` Unregister a solution from the coreAgentObjectType
    `void` | `unregisterSolutions(String... solutionNames)` Unregister solutions from the coreAgentObjectType

    - ### Methods inherited from class org.eclipse.jetty.websocket.servlet.WebSocketServlet

      `destroy`

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

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

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

- - ### Constructor Detail

    - #### TeaAgentServlet

          public TeaAgentServlet()

  - ### Method Detail

    - #### init

          public void init()
                    throws javax.servlet.ServletException

      Overrides:
        `init` in class `org.eclipse.jetty.websocket.servlet.WebSocketServlet`
      Throws:
        `javax.servlet.ServletException`

    - #### configure

          public void configure(org.eclipse.jetty.websocket.servlet.WebSocketServletFactory factory)

      Specified by:
        `configure` in class `org.eclipse.jetty.websocket.servlet.WebSocketServlet`

    - #### uncaughtException

          public void uncaughtException(Thread t,
                                        Throwable throwable)

      Specified by:
        `uncaughtException` in interface `Thread.UncaughtExceptionHandler`

    - #### autoRegisterAgent

          public void autoRegisterAgent(String serverURL,
                                        String agentURL)

    - #### autoRegisterAgent

          public void autoRegisterAgent(String agentName,
                                        String serverURL,
                                        String agentURL)

    - #### unregisterAgent

          public void unregisterAgent(String serverURL)
                               throws com.tibco.tea.agent.internal.server.TeaAgentUnregistrationException

      Throws:
        `com.tibco.tea.agent.internal.server.TeaAgentUnregistrationException`

    - #### registerSolution

          public void registerSolution(TeaSolution solution)

      Register a solution into the coreAgentObjectType
      Parameters:
        `solution` -

    - #### registerSolutions

          public void registerSolutions(TeaSolution... solution)

      Register solutions into the coreAgentObjectType
      Parameters:
        `solution` -

    - #### unregisterSolution

          public void unregisterSolution(String solutionName)

      Unregister a solution from the coreAgentObjectType
      Parameters:
        `solutionName` - solutionName to unregister

    - #### unregisterSolutions

          public void unregisterSolutions(String... solutionNames)

      Unregister solutions from the coreAgentObjectType
      Parameters:
        `solutionNames` - solutionnNames to unregister

    - #### setExposePythonAPI

          public void setExposePythonAPI(Boolean value)

    - #### getPersistence

          public TeaPersistence getPersistence()

      Get the Tea Persistence
      Returns:
        TeaPersistence Object

Copyright © 2022 TIBCO Software Inc.. All Rights Reserved.