Package io.micronaut.messaging
Class MessagingApplication
java.lang.Object
io.micronaut.messaging.MessagingApplication
- All Implemented Interfaces:
ApplicationContextLifeCycle<MessagingApplication>,ApplicationContextProvider,LifeCycle,Described,EmbeddedApplication<MessagingApplication>,Closeable,AutoCloseable
@Singleton
@Requires(missingBeans=EmbeddedApplication.class)
public class MessagingApplication
extends Object
implements EmbeddedApplication<MessagingApplication>, Described
An alternative
EmbeddedApplication that gets activated for messaging applications when
no other application is present.- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorsConstructorDescriptionMessagingApplication(ApplicationContext applicationContext, ApplicationConfiguration configuration) Constructs a new messaging application. -
Method Summary
Modifier and TypeMethodDescriptionResolves theApplicationContextfor this class.A description that describes this object.booleanbooleanisServer()This method returns whether the application is a server application or not.start()Starts the lifecyle component.stop()Stops the life cycle component.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.naming.Described
getDescriptionMethods inherited from interface io.micronaut.runtime.EmbeddedApplication
getEnvironment, isForceExit, isShutdownHookNeeded
-
Constructor Details
-
MessagingApplication
public MessagingApplication(ApplicationContext applicationContext, ApplicationConfiguration configuration) Constructs a new messaging application.- Parameters:
applicationContext- The contextconfiguration- The configuration
-
-
Method Details
-
getApplicationContext
Description copied from interface:ApplicationContextProviderResolves theApplicationContextfor this class.- Specified by:
getApplicationContextin interfaceApplicationContextProvider- Specified by:
getApplicationContextin interfaceEmbeddedApplication<MessagingApplication>- Returns:
- The
ApplicationContextfor the server
-
getApplicationConfiguration
- Specified by:
getApplicationConfigurationin interfaceEmbeddedApplication<MessagingApplication>- Returns:
- The
ApplicationConfigurationinstance
-
isRunning
public boolean isRunning() -
isServer
public boolean isServer()Description copied from interface:EmbeddedApplicationThis method returns whether the application is a server application or not. Server applications require that the thread be kept a live, preventing the application from exiting.- Specified by:
isServerin interfaceEmbeddedApplication<MessagingApplication>- Returns:
- True if the application is a server
-
start
Description copied from interface:LifeCycleStarts the lifecyle component.- Specified by:
startin interfaceApplicationContextLifeCycle<MessagingApplication>- Specified by:
startin interfaceLifeCycle- Returns:
- This lifecycle component
-
stop
Description copied from interface:LifeCycleStops the life cycle component.- Specified by:
stopin interfaceApplicationContextLifeCycle<MessagingApplication>- Specified by:
stopin interfaceLifeCycle- Returns:
- This lifecycle component
-
getDescription
Description copied from interface:DescribedA description that describes this object.- Specified by:
getDescriptionin interfaceDescribed- Returns:
- The description
-