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 Detail

      • registerProtofile

        void registerProtofile​(java.lang.String fileName,
                               java.lang.String contents)
                        throws java.lang.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:
        java.lang.Exception - in case of failure
      • registerProtofiles

        void registerProtofiles​(java.lang.String[] fileNames,
                                java.lang.String[] contents)
                         throws java.lang.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:
        java.lang.Exception - in case of failure
      • unregisterProtofile

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

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

        java.lang.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

        java.lang.String getProtofile​(java.lang.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

        java.lang.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

        java.lang.String getFileErrors​(java.lang.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