Interface ProtobufMetadataManagerMBean

All Superinterfaces:
ProtobufMetadataManagerConstants
All Known Subinterfaces:
ProtobufMetadataManager

public interface ProtobufMetadataManagerMBean extends ProtobufMetadataManagerConstants
MBean interface for ProtobufMetadataManager, suitable for building invocation proxies with one of the JMX.newMBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class<T>) methods.
Since:
7.1
Author:
anistor@redhat.com, gustavonalle
  • Method Details

    • registerProtofile

      void registerProtofile(String fileName, String contents) throws Exception
      Register a *.proto schema file. If there are any syntax or semantic errors a *.proto.errors key will be created in the underlying cache and its value will be the actual error message. The error message, if any, can be retrieved using getFileErrors(String fileName) method. The list of offending files can be retrieved using getFilesWithErrors() method.
      Parameters:
      fileName - the full name of the file (name can contain '/'); must end with ".proto" suffix
      contents - the file contents
      Throws:
      Exception - in case of failure
    • registerProtofiles

      void registerProtofiles(String[] fileNames, String[] contents) throws Exception
      Registers multiple *.proto schema files. If there are any syntax or semantic errors a *.proto.errors key will be created in the underlying cache for each offending file and its value will be the actual error message. The error message, if any, can be retrieved using getFileErrors(String fileName) method. The list of offending files can be retrieved using getFilesWithErrors() method.
      Parameters:
      fileNames - the full names of the files (name can contain '/'); names must end with ".proto" suffix
      contents - the contents of each file; this array must have the same length as fileNames
      Throws:
      Exception - in case of failure
    • unregisterProtofile

      void unregisterProtofile(String fileName) throws Exception
      Unregister a *.proto schema file.
      Parameters:
      fileName - the full name of the file (name can contain '/'); must end with ".proto" suffix
      Throws:
      Exception - in case of failure
    • unregisterProtofiles

      void unregisterProtofiles(String[] fileNames) throws Exception
      Unregisters multiple *.proto schema files.
      Parameters:
      fileNames - the full names of the files (name can contain '/'); names must end with ".proto" suffix
      Throws:
      Exception - in case of failure
    • getProtofileNames

      String[] getProtofileNames()
      Get the full names of all registered schema files.
      Returns:
      the array of all registered schema file names or an empty array if there are no files (never null)
    • getProtofile

      String getProtofile(String fileName)
      Gets the contents of a registered *.proto schema file.
      Parameters:
      fileName - the name of the file; must end with ".proto" suffix
      Returns:
      the file contents or null if the file does not exist
    • getFilesWithErrors

      String[] getFilesWithErrors()
      Get the full names of all files with errors.
      Returns:
      the array of all file names with errors or an empty array if there are no files with errors (never null)
    • getFileErrors

      String getFileErrors(String fileName)
      Gets the error messages (caused by parsing, linking, etc) associated to a *.proto schema file.
      Parameters:
      fileName - the name of the file; must end with ".proto" suffix
      Returns:
      the error text or null if there are no errors