private Protocol createProtocol(Optional<ProtocolHandler> handler) throws WiringException { SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory()); if (handler.isPresent()) { chain.add(handler.get()); } chain.wireExtensibleHandlers(); return new SMTPProtocol(chain, new SMTPConfigurationImpl()); }
private Protocol createProtocol(Optional<ProtocolHandler> handler) throws WiringException { SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory()); if (handler.isPresent()) { chain.add(handler.get()); } chain.wireExtensibleHandlers(); return new SMTPProtocol(chain, new SMTPConfigurationImpl()); }
protected Protocol createProtocol(ProtocolHandler... handlers) throws WiringException { SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory()); chain.addAll(0, Arrays.asList(handlers)); chain.wireExtensibleHandlers(); return new SMTPProtocol(chain, new SMTPConfigurationImpl()); }
protected Protocol createProtocol(ProtocolHandler... handlers) throws WiringException { SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory()); chain.addAll(0, Arrays.asList(handlers)); chain.wireExtensibleHandlers(); return new SMTPProtocol(chain, new SMTPConfigurationImpl()); }