org.apache.activemq.artemis.dto.BrokerDTO

Here are the examples of the java api class org.apache.activemq.artemis.dto.BrokerDTO taken from open source projects.

1. Stop#execute()

Project: activemq-artemis
File: Stop.java
@Override
public Object execute(ActionContext context) throws Exception {
    super.execute(context);
    BrokerDTO broker = getBrokerDTO();
    File file = broker.server.getConfigurationFile().getParentFile();
    File stopFile = new File(file, "STOP_ME");
    stopFile.createNewFile();
    return null;
}

2. Kill#execute()

Project: activemq-artemis
File: Kill.java
@Override
public Object execute(ActionContext context) throws Exception {
    super.execute(context);
    BrokerDTO broker = getBrokerDTO();
    File file = broker.server.getConfigurationFile().getParentFile();
    File killFile = new File(file, "KILL_ME");
    killFile.createNewFile();
    return null;
}

3. Run#execute()

Project: activemq-artemis
File: Run.java
@Override
public Object execute(ActionContext context) throws Exception {
    super.execute(context);
    FileConfiguration fileConfiguration = getFileConfiguration();
    Artemis.printBanner();
    createDirectories(getFileConfiguration());
    BrokerDTO broker = getBrokerDTO();
    addShutdownHook(broker.server.getConfigurationFile().getParentFile());
    ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);
    server = BrokerFactory.createServer(broker.server, security);
    server.start();
    if (broker.web != null) {
        broker.components.add(broker.web);
    }
    for (ComponentDTO componentDTO : broker.components) {
        Class clazz = this.getClass().getClassLoader().loadClass(componentDTO.componentClassName);
        ExternalComponent component = (ExternalComponent) clazz.newInstance();
        component.configure(componentDTO, getBrokerInstance(), getBrokerHome());
        component.start();
        components.add(component);
    }
    return null;
}