本文整理匯總了Java中org.mortbay.jetty.nio.SelectChannelConnector.setUseDirectBuffers方法的典型用法代碼示例。如果您正苦於以下問題:Java SelectChannelConnector.setUseDirectBuffers方法的具體用法?Java SelectChannelConnector.setUseDirectBuffers怎麽用?Java SelectChannelConnector.setUseDirectBuffers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.mortbay.jetty.nio.SelectChannelConnector
的用法示例。
在下文中一共展示了SelectChannelConnector.setUseDirectBuffers方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
@InterfaceAudience.Private
public static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnector();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
if(Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
// without this 2 NN's can start on the same machine and listen on
// the same port with indeterminate routing of incoming requests to them
ret.setReuseAddress(false);
}
ret.setHeaderBufferSize(1024*64);
return ret;
}
示例2: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
@InterfaceAudience.Private
public static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnector();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
if(Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
// without this 2 NN's can start on the same machine and listen on
// the same port with indeterminate routing of incoming requests to them
ret.setReuseAddress(false);
}
ret.setHeaderBufferSize(1024*64);
return ret;
}
示例3: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
@InterfaceAudience.Private
public static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnectorWithSafeStartup();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
if(Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
// without this 2 NN's can start on the same machine and listen on
// the same port with indeterminate routing of incoming requests to them
ret.setReuseAddress(false);
}
ret.setHeaderBufferSize(1024*64);
return ret;
}
示例4: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
@InterfaceAudience.Private
public static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnectorWithSafeStartup();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
if(Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
// without this 2 NN's can start on the same machine and listen on
// the same port with indeterminate routing of incoming requests to them
ret.setReuseAddress(false);
}
ret.setHeaderBufferSize(1024*64);
return ret;
}
示例5: createBaseListener
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
/** {@inheritDoc} */
protected Connector createBaseListener(Configuration conf)
throws IOException {
final String sAddr;
if (null == (sAddr = conf.get("proxy.http.test.listener.addr"))) {
SslSocketConnector sslListener = new SslSocketConnector();
sslListener.setKeystore(conf.get("ssl.server.keystore.location"));
sslListener.setPassword(conf.get("ssl.server.keystore.password", ""));
sslListener.setKeyPassword(conf.get("ssl.server.keystore.keypassword", ""));
sslListener.setKeystoreType(conf.get("ssl.server.keystore.type", "jks"));
sslListener.setNeedClientAuth(true);
System.setProperty("javax.net.ssl.trustStore",
conf.get("ssl.server.truststore.location", ""));
System.setProperty("javax.net.ssl.trustStorePassword",
conf.get("ssl.server.truststore.password", ""));
System.setProperty("javax.net.ssl.trustStoreType",
conf.get("ssl.server.truststore.type", "jks"));
return sslListener;
}
// unit test
InetSocketAddress proxyAddr = NetUtils.createSocketAddr(sAddr);
SelectChannelConnector testlistener = new SelectChannelConnector();
testlistener.setUseDirectBuffers(false);
testlistener.setHost(proxyAddr.getHostName());
testlistener.setPort(proxyAddr.getPort());
return testlistener;
}
示例6: configureChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
private static void configureChannelConnector(SelectChannelConnector c) {
c.setLowResourceMaxIdleTime(10000);
c.setAcceptQueueSize(128);
c.setResolveNames(false);
c.setUseDirectBuffers(false);
if(Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
// without this 2 NN's can start on the same machine and listen on
// the same port with indeterminate routing of incoming requests to them
c.setReuseAddress(false);
}
c.setHeaderBufferSize(1024*64);
}
示例7: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnector();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
return ret;
}
示例8: createBaseListener
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
/** {@inheritDoc} */
public Connector createBaseListener(Configuration conf)
throws IOException {
final String sAddr;
if (null == (sAddr = conf.get("proxy.http.test.listener.addr"))) {
SslSocketConnector sslListener = new SslSocketConnector();
sslListener.setKeystore(conf.get("ssl.server.keystore.location"));
sslListener.setPassword(conf.get("ssl.server.keystore.password", ""));
sslListener.setKeyPassword(conf.get("ssl.server.keystore.keypassword", ""));
sslListener.setKeystoreType(conf.get("ssl.server.keystore.type", "jks"));
sslListener.setNeedClientAuth(true);
System.setProperty("javax.net.ssl.trustStore",
conf.get("ssl.server.truststore.location", ""));
System.setProperty("javax.net.ssl.trustStorePassword",
conf.get("ssl.server.truststore.password", ""));
System.setProperty("javax.net.ssl.trustStoreType",
conf.get("ssl.server.truststore.type", "jks"));
return sslListener;
}
// unit test
InetSocketAddress proxyAddr = NetUtils.createSocketAddr(sAddr);
SelectChannelConnector testlistener = new SelectChannelConnector();
testlistener.setUseDirectBuffers(false);
testlistener.setHost(proxyAddr.getHostName());
testlistener.setPort(proxyAddr.getPort());
return testlistener;
}
示例9: createDefaultChannelConnector
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
public static Connector createDefaultChannelConnector() {
SelectChannelConnector ret = new SelectChannelConnector();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
return ret;
}
示例10: createBaseListener
import org.mortbay.jetty.nio.SelectChannelConnector; //導入方法依賴的package包/類
/**
* Create a required listener for the Jetty instance listening on the port
* provided. This wrapper and all subclasses must create at least one
* listener.
*/
protected Connector createBaseListener(Configuration conf)
throws IOException {
SelectChannelConnector ret = new SelectChannelConnector();
ret.setLowResourceMaxIdleTime(10000);
ret.setAcceptQueueSize(128);
ret.setResolveNames(false);
ret.setUseDirectBuffers(false);
return ret;
}