Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import quickfix.Acceptor;
import quickfix.ConfigError;
import quickfix.Connector;
import quickfix.Initiator;
import quickfix.RuntimeError;
import quickfix.Session;
import quickfix.SessionID;
import quickfix.SessionSettings;
Expand Down Expand Up @@ -142,6 +144,15 @@ private ObjectName[] toObjectNameArray(List<ObjectName> sessions) {
return sessions.toArray(new ObjectName[sessions.size()]);
}

public void start() throws IOException {
log.info("JMX operation: start {} {}", getRole(), this);
try {
connector.start();
} catch (ConfigError | RuntimeError e) {
throw JmxSupport.toIOException(e);
}
}

public void stop(boolean force) {
log.info("JMX operation: stop {} {}", getRole(), this);
connector.stop(force);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ public interface ConnectorAdminMBean {
*/
String getRole() throws IOException;

/**
* Start the connector.
*
* @throws IOException if there is a problem starting the connector
*/
void start() throws IOException;

/**
* Stop the connector.
*
Expand Down