Interface ProtobufMetadataManagerMBean
- All Superinterfaces:
ProtobufMetadataManagerConstants
- All Known Subinterfaces:
ProtobufMetadataManager
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
-
Field Summary
Fields inherited from interface org.infinispan.query.remote.client.ProtobufMetadataManagerConstants
ERRORS_KEY_SUFFIX, OBJECT_NAME, PROTO_KEY_SUFFIX, PROTOBUF_METADATA_CACHE_NAME
-
Method Summary
Modifier and TypeMethodDescriptiongetFileErrors
(String fileName) Gets the error messages (caused by parsing, linking, etc) associated to a *.proto schema file.String[]
Get the full names of all files with errors.getProtofile
(String fileName) Gets the contents of a registered *.proto schema file.String[]
Get the full names of all registered schema files.void
registerProtofile
(String fileName, String contents) Register a *.proto schema file.void
registerProtofiles
(String[] fileNames, String[] contents) Registers multiple *.proto schema files.void
unregisterProtofile
(String fileName) Unregister a *.proto schema file.void
unregisterProtofiles
(String[] fileNames) Unregisters multiple *.proto schema files.
-
Method Details
-
registerProtofile
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 usinggetFileErrors(String fileName)
method. The list of offending files can be retrieved usinggetFilesWithErrors()
method.- Parameters:
fileName
- the full name of the file (name can contain '/'); must end with ".proto" suffixcontents
- the file contents- Throws:
Exception
- in case of failure
-
registerProtofiles
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 usinggetFileErrors(String fileName)
method. The list of offending files can be retrieved usinggetFilesWithErrors()
method.- Parameters:
fileNames
- the full names of the files (name can contain '/'); names must end with ".proto" suffixcontents
- the contents of each file; this array must have the same length asfileNames
- Throws:
Exception
- in case of failure
-
unregisterProtofile
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
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
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
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
-