-
Notifications
You must be signed in to change notification settings - Fork 280
3.4.0 Upgrade Guide
Mirth Connect plugins that implement custom client <-> server communication will need to be updated to use the new HTTP servlet architecture introduced in version 3.4.0.
Specifically, the invoke() method has been removed from the ServicePlugin interface as well as the ClientPlugin abstract class. Prior to 3.4.0, calls to ClientPlugin.invoke() on the client were routed to ServicePlugin.invoke() on the server.
Plugins that previously used these methods must now provide a separate servlet interface on the server side using JAX-RS and Swagger annotations:
ServerLogInterface.java:
@Path("/extensions/serverlog")
@Api("Extension Services")
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public interface ServerLogServletInterface extends BaseServletInterface {
public static final String PLUGIN_POINT = "Server Log";
public static final String PERMISSION_VIEW = "View Server Log";
@GET
@Path("/")
@ApiOperation("Retrieves all server log entries.")
@MirthOperation(name = "getMirthServerLogs", display = "View Server Log", permission = PERMISSION_VIEW, type = ExecuteType.ASYNC, auditable = false)
public LinkedList<String[]> getServerLogs() throws ClientException;
To invoke servlet methods from the client side, use the getServlet() method instead of the previous invokePluginMethod* methods.
ServerLogClient.java - 3.3.x and earlier:
try {
serverLogReceived = (LinkedList<String[]>) PlatformUI.MIRTH_FRAME.mirthClient.invokePluginMethodAsync(SERVER_LOG_SERVICE_PLUGINPOINT, GET_SERVER_LOGS, null);
} catch (ClientException e) {
ServerLogClient.java - 3.4.0 and later:
try {
serverLogReceived = PlatformUI.MIRTH_FRAME.mirthClient.getServlet(ServerLogServletInterface.class).getServerLogs();
} catch (ClientException e) {
The servlet interface must also be specified in the plugin's plugin.xml file:
<pluginMetaData path="serverlog">
...
<apiProvider type="SERVLET_INTERFACE" name="com.mirth.connect.plugins.serverlog.ServerLogServletInterface"/>
...
</pluginMetaData>
- Home
- Frequently Asked Questions
- Source Code Contribution
- Java Licensing
- How to Contribute to the Wiki
- Administrator Launcher (MCAL)
-
Mirth Connect
-
Release Notes
- 4.5.0 - What's New
- 4.4.0 - What's New
- 4.3.0 - What's New
- 4.2.0 - What's New
- 4.1.0 - What's New
- 4.0.0 - What's New
- 3.12.0 - What's New
- 3.11.0 - What's New
- 3.10.0 - What's New
- 3.9.0 - What's New
- 3.8.0 - What's New
- 3.7.0 - What's New
- 3.6.0 - What's New
- 3.5.0 - What's New
- 3.4.0 - What's New
- 3.3.0 - What's New
- 3.2.0 - What's New
- 3.1.0 - What's New
- 3.0.0 - What's New
- Upgrading
-
Release Notes
- User Guide
- Commercial Extensions
- Examples and Tutorials