Class FilterProfileRegistryClient


  • public class FilterProfileRegistryClient
    extends java.lang.Object
    Client class for managing filter profiles either with Philter or with a Philter Profile Registry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean delete​(java.lang.String filterProfileName)
      Deletes a filter profile.
      java.util.List<java.lang.String> get()
      Gets a list of filter profile names.
      java.lang.String get​(java.lang.String filterProfileName)
      Gets the content of a filter profile.
      boolean save​(java.lang.String json)
      Saves (or overwrites) the filter profile.
      StatusResponse status()
      Gets the status of Philter or the Filter Profile Registry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilterProfileRegistryClient

        public FilterProfileRegistryClient​(java.lang.String endpoint)
        Creates a new client.
        Parameters:
        endpoint - The Philter endpoint or the Filter Profile Registry endpoint, e.g. https://127.0.0.1:8080.
      • FilterProfileRegistryClient

        public FilterProfileRegistryClient​(java.lang.String endpoint,
                                           okhttp3.OkHttpClient okHttpClient)
        Creates a new client.
        Parameters:
        endpoint - The Philter endpoint or the Filter Profile Registry endpoint, e.g. https://127.0.0.1:8080.
        okHttpClient - A custom OkHttpClient.
    • Method Detail

      • status

        public StatusResponse status()
                              throws java.io.IOException
        Gets the status of Philter or the Filter Profile Registry.
        Returns:
        The StatusResponse.
        Throws:
        java.io.IOException - Thrown if the call not be executed.
      • get

        public java.util.List<java.lang.String> get()
                                             throws java.io.IOException
        Gets a list of filter profile names.
        Returns:
        A list of filter profile names.
        Throws:
        java.io.IOException - Thrown if the call not be executed.
      • get

        public java.lang.String get​(java.lang.String filterProfileName)
                             throws java.io.IOException
        Gets the content of a filter profile.
        Parameters:
        filterProfileName - The name of the filter profile to get.
        Returns:
        The content of the filter profile.
        Throws:
        java.io.IOException - Thrown if the call not be executed.
      • save

        public boolean save​(java.lang.String json)
                     throws java.io.IOException
        Saves (or overwrites) the filter profile.
        Parameters:
        json - The body of the filter profile.
        Returns:
        true if successful, otherwise false.
        Throws:
        java.io.IOException - Thrown if the call not be executed.
      • delete

        public boolean delete​(java.lang.String filterProfileName)
                       throws java.io.IOException
        Deletes a filter profile.
        Parameters:
        filterProfileName - The name of the filter profile to delete.
        Returns:
        true if successful, otherwise false.
        Throws:
        java.io.IOException - Thrown if the call not be executed.