@NotThreadSafe public static class ProtocolStack.Builder extends Object
ProtocolStack instances.| Modifier and Type | Method and Description |
|---|---|
<T> ProtocolStack<T> |
build(ApplicationLayer<T> application)
Create the
ProtocolStack. |
ProtocolStack.Builder |
filter(FilterLayer filter)
Adds the supplied filter into the
ProtocolStack. |
ProtocolStack.Builder |
listener(ProtocolStack.Listener listener)
Register a
ProtocolStack.Listener for the ProtocolStack. |
ProtocolStack.Builder |
named(String name)
Provide a custom name for the
ProtocolStack. |
public ProtocolStack.Builder filter(@CheckForNull FilterLayer filter)
ProtocolStack.filter - the filter to add, if null then it will be ignored (useful for conditionally adding
filters)this.public ProtocolStack.Builder named(String name)
ProtocolStack.name - the custom name.thispublic ProtocolStack.Builder listener(ProtocolStack.Listener listener)
ProtocolStack.Listener for the ProtocolStack.listener - the listener.thispublic <T> ProtocolStack<T> build(ApplicationLayer<T> application) throws IOException
ProtocolStack.T - the application specific API.application - the ApplicationLayer to use.ProtocolStack.IOException - if the ProtocolStack could not be started.Copyright © 2004–2018. All rights reserved.