Examples of createRequest()


Examples of org.jnode.driver.bus.usb.USBControlPipe.createRequest()

     */
    private void readPortStatus(int port, PortStatus data) throws USBException {
        testPort(port);
        final USBControlPipe pipe = dev.getDefaultControlPipe();
        final USBRequest req =
            pipe.createRequest(new SetupPacket(USB_DIR_IN | USB_RT_PORT, USB_REQ_GET_STATUS, 0, port + 1, 4), data);
        pipe.syncSubmit(req, GET_TIMEOUT);
    }

}
View Full Code Here

Examples of org.jnode.driver.bus.usb.USBDataPipe.createRequest()

            cbw.setLength((byte) scsiCmd.length);
            cbw.setCdb(scsiCmd);
            log.debug(cbw.toString());
            // Sent CBW to device
            USBDataPipe outPipe = ((USBDataPipe) storageDeviceData.getBulkOutEndPoint().getPipe());
            USBRequest req = outPipe.createRequest(cbw);
            if (timeout <= 0) {
                outPipe.asyncSubmit(req);
            } else {
                outPipe.syncSubmit(req, timeout);
            }
View Full Code Here

Examples of org.jnode.driver.bus.usb.USBDataPipe.createRequest()

            }
            //
            CSW csw = new CSW();
            csw.setSignature(US_BULK_CS_SIGN);
            USBDataPipe inPipe = ((USBDataPipe) storageDeviceData.getBulkInEndPoint().getPipe());
            USBRequest resp = inPipe.createRequest(csw);
            if (timeout <= 0) {
                inPipe.asyncSubmit(resp);
            } else {
                inPipe.syncSubmit(resp, timeout);
            }
View Full Code Here

Examples of org.jredis.protocol.Protocol.createRequest()

    try {
      // 1 - Request
      //        Log.log("RedisConnection - requesting ..." + cmd.code);
     
      request = Assert.notNull(protocol.createRequest (cmd, args), "request object from handler", ProviderException.class);
      request.write(super.getOutputStream());

      // 2 - response
      //        Log.log("RedisConnection - read response ..." + cmd.code);
      response = Assert.notNull(protocol.createResponse(cmd), "response object from handler", ProviderException.class);
View Full Code Here

Examples of org.mapfish.print.http.MfClientHttpRequestFactory.createRequest()

    @Test
    public void testCreateFactoryWrapperLegalRequest() throws Exception {
        ClientHttpFactoryProcessorParam params = new ClientHttpFactoryProcessorParam();
        final MfClientHttpRequestFactory factoryWrapper = restrictUrisProcessor.createFactoryWrapper(params, requestFactory);
        factoryWrapper.createRequest(new URI("http://localhost:8080/geoserver/wms"), HttpMethod.GET);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testCreateFactoryWrapperIllegalRequest() throws Exception {
        ClientHttpFactoryProcessorParam params = new ClientHttpFactoryProcessorParam();
View Full Code Here

Examples of org.springframework.http.client.ClientHttpRequestFactory.createRequest()

    @Test(expected = IllegalArgumentException.class)
    public void testCreateFactoryWrapperIllegalRequest() throws Exception {
        ClientHttpFactoryProcessorParam params = new ClientHttpFactoryProcessorParam();
        final ClientHttpRequestFactory factoryWrapper = restrictUrisProcessor.createFactoryWrapper(params, requestFactory);
        factoryWrapper.createRequest(new URI("http://www.google.com/q"), HttpMethod.GET);
    }
}
View Full Code Here

Examples of org.springframework.http.client.ClientHttpRequestFactory.createRequest()

        when(client.getHeaders()).thenReturn(headers);
        when(client.getBody()).thenReturn(buffer);
        when(client.execute()).thenReturn(resp);

        ClientHttpRequestFactory factory = mock(ClientHttpRequestFactory.class);
        when(factory.createRequest(any(URI.class), any(HttpMethod.class))).thenReturn(client);

        // add the new interceptor...
        BasicAuthInterceptor interceptor = new BasicAuthInterceptor();
        interceptor.setPropertyResolver(resolver);
        interceptor.setId(id);
View Full Code Here

Examples of org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest()

        factory.setConnectTimeout(15 * 1000);
        factory.setReadTimeout(15 * 1000);

        URI uri = new URI("http://localhost:" + TEST_PORT + "/testConnectionFactory");
        HttpMethod method = HttpMethod.GET;
        ClientHttpRequest request = factory.createRequest(uri, method);
        ClientHttpResponse response = request.execute();
        assertEquals("Mismatched response code", HttpStatus.OK.value(), response.getRawStatusCode());

        BufferedReader rdr = new BufferedReader(new InputStreamReader(response.getBody()));
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.