Installing a Plug-in Using Configuration
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
A plug-in can be installed into a communicator using a configuration property of the following form:
Ice.Plugin.Name=entry_point [arg ...]Most plug-ins accept only one specific name, so make sure to use the plug-in’s name for Name.
In C++ and C++-based language mappings, entry_point consists of the path name of the shared library or DLL containing the factory function, along with the name of the factory function.
For example:
Ice.Plugin.CustomLogger=customlogger,0:createCustomLoggerPlugin logLevel=DebugWith customlogger,0, Ice loads customlogger0.dll on Windows, libcustomlogger.so.0 on Linux, and libcustomlogger.0.dylib on macOS. See Ice.Plugin.name for the format of this entry point.
In C#, entry_point names an assembly and a plug-in factory class, separated by a colon. The assembly can be an assembly name or a file path. The factory class must implement Ice.PluginFactory and provide a public parameterless constructor.
For example:
Ice.Plugin.CustomLogger=CustomLogger.dll:ClearSky.CustomLoggerPluginFactory logLevel=DebugIn Java, entry_point names a public plug-in factory class that implements com.zeroc.Ice.PluginFactory and has a public no-argument constructor. An optional JAR or class-directory path precedes the class name, separated by a colon. Without a path, Ice uses its configured class loaders to find the class.
For example:
Ice.Plugin.CustomLogger=com.example.clearsky.CustomLoggerPluginFactory logLevel=DebugThis mapping loads C++ plug-ins. The entry point names a shared library or DLL and its exported factory function:
Ice.Plugin.CustomLogger=customlogger,0:createCustomLoggerPluginWith customlogger,0, Ice loads customlogger0.dll on Windows and libcustomlogger.so.0 on Linux. See Ice.Plugin.name for the format of this entry point.
For the included discovery plug-ins, use Ice.Plugin.IceDiscovery=1 or Ice.Plugin.IceLocatorDiscovery=1 to enable the corresponding built-in factory.
This mapping loads C++ plug-ins. The entry point names a shared library or DLL and its exported factory function:
Ice.Plugin.CustomLogger=customlogger,0:createCustomLoggerPluginWith customlogger,0, Ice loads libcustomlogger.so.0 on Linux and libcustomlogger.0.dylib on macOS. See Ice.Plugin.name for the format of this entry point.
For the included discovery plug-ins, use Ice.Plugin.IceDiscovery=1 or Ice.Plugin.IceLocatorDiscovery=1 to enable the corresponding built-in factory.
This mapping loads C++ plug-ins. The entry point names a shared library or DLL and its exported factory function:
Ice.Plugin.CustomLogger=customlogger,0:createCustomLoggerPluginWith customlogger,0, Ice loads customlogger0.dll on Windows, libcustomlogger.so.0 on Linux, and libcustomlogger.0.dylib on macOS. See Ice.Plugin.name for the format of this entry point.
For the included discovery plug-ins, use Ice.Plugin.IceDiscovery=1 or Ice.Plugin.IceLocatorDiscovery=1 to enable the corresponding built-in factory.
This mapping loads C++ plug-ins. The entry point names a shared library or DLL and its exported factory function:
Ice.Plugin.CustomLogger=customlogger,0:createCustomLoggerPluginWith customlogger,0, Ice loads libcustomlogger.0.dylib. See Ice.Plugin.name for the format of this entry point.
For the included discovery plug-ins, use Ice.Plugin.IceDiscovery=1 or Ice.Plugin.IceLocatorDiscovery=1 to enable the corresponding built-in factory.
The Ice.Plugin.* property reference describes entry_point in greater detail.
After extracting the plug-in's entry point from the property value, any remaining text is parsed using semantics similar to that of command-line arguments. Whitespace separates the arguments, and any arguments that contain whitespace must be enclosed in quotes:
Ice.Plugin.MyPlugin=entry_point --load "C:\Data Files\config.dat"Ice converts arguments of the form --Name.Property=value into communicator properties and removes them from the argument list. It passes the remaining arguments to the plug-in factory during construction. For example:
Ice.Plugin.MyPlugin=entry_point --MyPlugin.Mode=fast input.datThe factory receives input.dat in its arguments and can read MyPlugin.Mode from the communicator's properties.