public class EmbeddedAppmasterTrackService extends java.lang.Object implements AppmasterTrackService, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
AppmasterTrackService
which delegates to an
EmbeddedServletContainer
to find a configured port whether that is
hard coded or set to be picked up automatically.
EmbeddedServletContainer
is received from an ApplicationEvent
send by boot to notify existence of
AnnotationConfigEmbeddedWebApplicationContext
.
Constructor and Description |
---|
EmbeddedAppmasterTrackService()
Instantiates a new embedded appmaster track service with
default wait time of 60 seconds.
|
EmbeddedAppmasterTrackService(long waitTime)
Instantiates a new embedded appmaster track service.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getTrackUrl()
Gets a url of this track service.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
void |
setWaitTime(long waitTime)
Sets the max time waiting for embedded container port.
|
public EmbeddedAppmasterTrackService()
public EmbeddedAppmasterTrackService(long waitTime)
waitTime
- the wait time in millispublic java.lang.String getTrackUrl()
AppmasterTrackService
getTrackUrl
in interface AppmasterTrackService
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public void setWaitTime(long waitTime)
waitTime
- the new wait time in millis