当前位置: 首页>>代码示例>>Java>>正文


Java StringEndPoint类代码示例

本文整理汇总了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);
}
 
开发者ID:apache,项目名称:reef,代码行数:31,代码来源:TestJettyHandler.java

示例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);
}
 
开发者ID:apache,项目名称:reef,代码行数:14,代码来源:TestParsedHttpRequest.java


注:本文中的org.mortbay.io.bio.StringEndPoint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。