Class JettyServiceBuilder
java.lang.Object
com.linecorp.armeria.server.jetty.JettyServiceBuilder
public final class JettyServiceBuilder extends Object
-
Method Summary
Modifier and Type Method Description JettyServiceBuilder
attr(String name, Object attribute)
Puts the specified attribute into the JettyServer
.JettyServiceBuilder
bean(Object bean)
Adds the specified bean to the JettyServer
.JettyServiceBuilder
bean(Object bean, boolean managed)
Adds the specified bean to the JettyServer
.JettyService
build()
Returns a newly-createdJettyService
based on the properties of this builder.JettyServiceBuilder
configurator(Consumer<? super Server> configurator)
Adds aConsumer
that performs additional configuration operations against the JettyServer
created by aJettyService
.JettyServiceBuilder
dumpAfterStart(boolean dumpAfterStart)
Sets whether the JettyServer
needs to dump its configuration after it started up.JettyServiceBuilder
dumpBeforeStop(boolean dumpBeforeStop)
Sets whether the JettyServer
needs to dump its configuration before it shuts down.JettyServiceBuilder
eventListener(Container.Listener eventListener)
Adds the specified event listener to the JettyServer
.JettyServiceBuilder
handler(Handler handler)
JettyServiceBuilder
handlerWrapper(HandlerWrapper handlerWrapper)
Adds the specifiedHandlerWrapper
to the JettyServer
.JettyServiceBuilder
hostname(String hostname)
Sets the default hostname of the JettyServer
.JettyServiceBuilder
lifeCycleListener(LifeCycle.Listener lifeCycleListener)
Adds the specified life cycle listener to the JettyServer
.JettyServiceBuilder
requestLog(RequestLog requestLog)
Sets theRequestLog
of the JettyServer
.JettyServiceBuilder
sessionIdManager(SessionIdManager sessionIdManager)
Sets theSessionIdManager
of the JettyServer
.JettyServiceBuilder
sessionIdManagerFactory(Function<? super Server,? extends SessionIdManager> sessionIdManagerFactory)
Sets the factory that creates a new instance ofSessionIdManager
for the JettyServer
.JettyServiceBuilder
stopTimeoutMillis(long stopTimeoutMillis)
Sets the graceful stop time of theAbstractLifeCycle.stop()
in milliseconds.String
toString()
-
Method Details
-
hostname
Sets the default hostname of the JettyServer
. -
attr
Puts the specified attribute into the JettyServer
.- See Also:
Server.setAttribute(String, Object)
-
bean
Adds the specified bean to the JettyServer
.- See Also:
ContainerLifeCycle.addBean(Object)
-
bean
Adds the specified bean to the JettyServer
. -
dumpAfterStart
Sets whether the JettyServer
needs to dump its configuration after it started up.- See Also:
Server.setDumpAfterStart(boolean)
-
dumpBeforeStop
Sets whether the JettyServer
needs to dump its configuration before it shuts down.- See Also:
Server.setDumpBeforeStop(boolean)
-
handler
- See Also:
HandlerWrapper.setHandler(Handler)
-
handlerWrapper
Adds the specifiedHandlerWrapper
to the JettyServer
. -
requestLog
Sets theRequestLog
of the JettyServer
.- See Also:
Server.setRequestLog(RequestLog)
-
sessionIdManager
Sets theSessionIdManager
of the JettyServer
. This method is a shortcut for:sessionIdManagerFactory(server -> sessionIdManager);
-
sessionIdManagerFactory
public JettyServiceBuilder sessionIdManagerFactory(Function<? super Server,? extends SessionIdManager> sessionIdManagerFactory)Sets the factory that creates a new instance ofSessionIdManager
for the JettyServer
. -
stopTimeoutMillis
Sets the graceful stop time of theAbstractLifeCycle.stop()
in milliseconds.- See Also:
Server.setStopTimeout(long)
-
eventListener
Adds the specified event listener to the JettyServer
. -
lifeCycleListener
Adds the specified life cycle listener to the JettyServer
. -
configurator
Adds aConsumer
that performs additional configuration operations against the JettyServer
created by aJettyService
. -
build
Returns a newly-createdJettyService
based on the properties of this builder. -
toString
-