本文整理汇总了Java中org.mortbay.io.bio.StringEndPoint类的典型用法代码示例。如果您正苦于以下问题:Java StringEndPoint类的具体用法?Java StringEndPoint怎么用?Java StringEndPoint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StringEndPoint类属于org.mortbay.io.bio包,在下文中一共展示了StringEndPoint类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.mortbay.io.bio.StringEndPoint; //导入依赖的package包/类
@Before
public void setUp() throws InjectionException, IOException, ServletException {
this.request = new Request(
new HttpConnection(new LocalConnector(), new StringEndPoint(), new Server()));
this.request.setContentType("text/json");
this.response = new Response(
new HttpConnection(new LocalConnector(), new StringEndPoint(), new Server()));
final Configuration httpHandlerConfiguration = HttpHandlerConfiguration.CONF
.set(HttpHandlerConfiguration.HTTP_HANDLERS, HttpServerReefEventHandler.class)
.build();
final Tang tang = Tang.Factory.getTang();
final Configuration remoteConfiguration = tang.newConfigurationBuilder()
.bindNamedParameter(RemoteConfiguration.ManagerName.class, "REEF_TEST_REMOTE_MANAGER")
.bindNamedParameter(RemoteConfiguration.MessageCodec.class, REEFMessageCodec.class)
.bindNamedParameter(JobIdentifier.class, "my job")
.build();
final Configuration finalConfig =
Configurations.merge(httpHandlerConfiguration, remoteConfiguration);
final Injector injector = tang.newInjector(finalConfig);
this.handler = injector.getInstance(JettyHandler.class);
}
示例2: setUp
import org.mortbay.io.bio.StringEndPoint; //导入依赖的package包/类
@Before
public void setUp() throws IOException, ServletException {
this.request = new Request(
new HttpConnection(new LocalConnector(), new StringEndPoint(), new Server()));
this.request.setUri(new HttpURI("http://microsoft.com:8080/whatever/v1/id123#test?a=10&b=20&a=30"));
this.request.setQueryString("a=10&b=20&a=30");
this.request.setContentType("text/json");
this.request.setPathInfo("/whatever/v1/id123#test");
this.parsedRequest = new ParsedHttpRequest(this.request);
}