Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get connectorListener state on Mirth 4.4.2 #6314

Open
ramsoftmarc opened this issue Sep 25, 2024 · 2 comments
Open

Unable to get connectorListener state on Mirth 4.4.2 #6314

ramsoftmarc opened this issue Sep 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ramsoftmarc
Copy link

Previously on Mirth 3.4.2, I was able to get the state of a connector listener using this code:

var defController = Packages.com.mirth.connect.server.controllers.DefaultExtensionController.create();
var monitor = defController.getServicePlugins().get(com.mirth.connect.plugins.dashboardstatus.DashboardConnectorStatusServletInterface.PLUGIN_POINT);
connectorListener = monitor.getConnectorListener();
var states = connectorListener.getConnectorStateMap();
thisState = states.get(myChannelId + '_0')[1];

Using Mirth 4.4.2 I'm getting this error:

Can't find method com.mirth.connect.plugins.dashboardstatus.DashboardConnectorEventListener.getConnectorStateMap().

Was this removed or is there another function call to get the state?

I'm Using openJDK v15

@ramsoftmarc ramsoftmarc added the bug Something isn't working label Sep 25, 2024
@ab-mg-23
Copy link

The method signature was changed.

public Map<String, Object[]> getConnectorStateMap(String serverId) {
return logController.getConnectorStateMap(serverId);
}

var states = connectorListener.getConnectorStateMap(""); should get you what you want but untested on my end.

@ramsoftmarc
Copy link
Author

That seems to work, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants