use of org.apache.qpid.server.model.AbstractSystemConfig in project qpid-broker-j by apache.
the class ManagementModeStoreHandlerTest method createManagementModeStoreHandler.
private ManagementModeStoreHandler createManagementModeStoreHandler() {
_systemConfig.close();
Map<String, Object> attributes = new HashMap<>(_systemConfigAttributes);
attributes.put(ConfiguredObject.DESIRED_STATE, State.QUIESCED);
attributes.remove(ConfiguredObject.TYPE);
_systemConfig = new AbstractSystemConfig(_taskExecutor, mock(EventLogger.class), mock(Principal.class), attributes) {
@Override
protected void onOpen() {
}
@Override
protected DurableConfigurationStore createStoreObject() {
return _store;
}
@Override
protected ListenableFuture<Void> onClose() {
return Futures.immediateFuture(null);
}
@Override
@StateTransition(currentState = State.UNINITIALIZED, desiredState = State.QUIESCED)
protected ListenableFuture<Void> startQuiesced() {
return Futures.immediateFuture(null);
}
};
_systemConfig.open();
return new ManagementModeStoreHandler(_store, _systemConfig);
}
Aggregations