我正在尝试使用 m2e (maven) 插件在 eclipse 中运行 i-jetty。文件IJettyService的源代码.java在第530行给出
SslSelectChannelConnector sslConnector = new SslSelectChannelConnector(sslContextFactory);
Eclipse IDE 在这里抱怨
The constructor SslSelectChannelConnector(SslContextFactory) is
undefined
所以我使用了一个反编译器,发现它确实存在。
/* ------------------------------------------------------------ */
public SslSelectChannelConnector()
{
this(new SslContextFactory(SslContextFactory.DEFAULT_KEYSTORE_PATH));
setSoLingerTime(30000);
}
/* ------------------------------------------------------------ */
/** Construct with explicit SslContextFactory.
* The SslContextFactory passed is added via {@link #addBean(Object)} so that
* it's lifecycle may be managed with {@link AggregateLifeCycle}.
* @param sslContextFactory
*/
public SslSelectChannelConnector(SslContextFactory sslContextFactory)
{
_sslContextFactory = sslContextFactory;
addBean(_sslContextFactory);
setUseDirectBuffers(false);
setSoLingerTime(30000);
}
我不明白为什么它的行为方式.有人遇到过类似的问题吗?
从您在此处发布的内容来看,这应该可以工作。 也许您的类路径上有旧版本的 Jetty 库? 尝试new SslSelectChannelConnector( null )
,看看会发生什么。