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.Listenerfor theProtocolStack.Provide a custom name for theProtocolStack.
-
Method Details
-
filter
Adds the supplied filter into theProtocolStack.- Parameters:
filter- the filter to add, ifnullthen 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.Listenerfor theProtocolStack.- Parameters:
listener- the listener.- Returns:
this
-
build
Create theProtocolStack.- Type Parameters:
T- the application specific API.- Parameters:
application- theApplicationLayerto use.- Returns:
- the
ProtocolStack. - Throws:
IOException- if theProtocolStackcould not be started.
-