berlin.yuna.natsserver.embedded.logic.NatsServer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nats-server-embedded Show documentation
Show all versions of nats-server-embedded Show documentation
Nats server embedded for testing which contains the original Nats server
package berlin.yuna.natsserver.embedded.logic;
import berlin.yuna.natsserver.config.NatsOptions;
import berlin.yuna.natsserver.logic.Nats;
import org.springframework.beans.factory.DisposableBean;
/**
* {@link NatsServer}
*/
public class NatsServer extends Nats implements DisposableBean {
public static final String BEAN_NAME = NatsServer.class.getSimpleName();
/**
* Create {@link NatsServer} with the simplest start able configuration
*/
public NatsServer(final NatsOptions options) {
super(options);
}
/**
* Simply stops the {@link NatsServer}
*
* @see NatsServer#close()
*/
@Override
public void destroy() {
close();
}
}