File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
quickfixj-core/src/main/java/org/quickfixj/jmx/mbean/connector Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 2525import org .slf4j .Logger ;
2626import org .slf4j .LoggerFactory ;
2727import quickfix .Acceptor ;
28+ import quickfix .ConfigError ;
2829import quickfix .Connector ;
2930import quickfix .Initiator ;
31+ import quickfix .RuntimeError ;
3032import quickfix .Session ;
3133import quickfix .SessionID ;
3234import quickfix .SessionSettings ;
@@ -142,6 +144,15 @@ private ObjectName[] toObjectNameArray(List<ObjectName> sessions) {
142144 return sessions .toArray (new ObjectName [sessions .size ()]);
143145 }
144146
147+ public void start () throws IOException {
148+ log .info ("JMX operation: start {} {}" , getRole (), this );
149+ try {
150+ connector .start ();
151+ } catch (ConfigError | RuntimeError e ) {
152+ throw JmxSupport .toIOException (e );
153+ }
154+ }
155+
145156 public void stop (boolean force ) {
146157 log .info ("JMX operation: stop {} {}" , getRole (), this );
147158 connector .stop (force );
Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ public interface ConnectorAdminMBean {
3030 */
3131 String getRole () throws IOException ;
3232
33+ /**
34+ * Start the connector.
35+ *
36+ * @throws IOException if there is a problem starting the connector
37+ */
38+ void start () throws IOException ;
39+
3340 /**
3441 * Stop the connector.
3542 *
You can’t perform that action at this time.
0 commit comments