Package org.jenkinsci.remoting.protocol
Class ProtocolStack.Builder
java.lang.Object
org.jenkinsci.remoting.protocol.ProtocolStack.Builder
- Enclosing class:
- ProtocolStack<T>
Builder for
ProtocolStack
instances.-
Method Summary
Modifier and TypeMethodDescription<T> ProtocolStack<T>
build
(ApplicationLayer<T> application) Create theProtocolStack
.filter
(FilterLayer filter) Adds the supplied filter into theProtocolStack
.listener
(ProtocolStack.Listener listener) Register aProtocolStack.Listener
for theProtocolStack
.Provide a custom name for theProtocolStack
.
-
Method Details
-
filter
Adds the supplied filter into theProtocolStack
.- Parameters:
filter
- the filter to add, ifnull
then it will be ignored (useful for conditionally adding filters)- Returns:
this
.
-
named
Provide a custom name for theProtocolStack
.- Parameters:
name
- the custom name.- Returns:
this
-
listener
Register aProtocolStack.Listener
for theProtocolStack
.- Parameters:
listener
- the listener.- Returns:
this
-
build
Create theProtocolStack
.- Type Parameters:
T
- the application specific API.- Parameters:
application
- theApplicationLayer
to use.- Returns:
- the
ProtocolStack
. - Throws:
IOException
- if theProtocolStack
could not be started.
-