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 theJMX.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFileErrors(String fileName)
Gets the error messages (caused by parsing, linking, etc) associated to a *.proto schema file.String[]
getFilesWithErrors()
Get the full names of all files with errors.String
getProtofile(String fileName)
Gets the contents of a registered *.proto schema file.String[]
getProtofileNames()
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 Detail
-
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 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
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 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
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)
-
-