コード例 #1
0
ファイル: AhcWebSocketConduit.java プロジェクト: Jutten/cxf
    protected AhcWebSocketWrappedOutputStream(
        Message message,
        boolean possibleRetransmit,
        boolean isChunking,
        int chunkThreshold,
        String conduitName,
        URI url) {
      super(message, possibleRetransmit, isChunking, chunkThreshold, conduitName, url);

      entity = message.get(AhcWebSocketConduitRequest.class);
      // REVISIT how we prepare the request
      String requri = (String) message.getContextualProperty("org.apache.cxf.request.uri");
      if (requri != null) {
        // jaxrs speicfies a sub-path using prop org.apache.cxf.request.uri
        if (requri.startsWith("ws")) {
          entity.setPath(requri.substring(requri.indexOf('/', 3 + requri.indexOf(':'))));
        } else {
          entity.setPath(url.getPath() + requri);
        }
      } else {
        // jaxws
        entity.setPath(url.getPath());
      }
      entity.setId(UUID.randomUUID().toString());
      uncorrelatedRequests.put(entity.getId(), new RequestResponse(entity));
    }
コード例 #2
0
    protected AhcWebSocketWrappedOutputStream(
        Message message,
        boolean possibleRetransmit,
        boolean isChunking,
        int chunkThreshold,
        String conduitName,
        URI url) {
      super(message, possibleRetransmit, isChunking, chunkThreshold, conduitName, url);

      entity = message.get(AhcWebSocketConduitRequest.class);
      // REVISIT how we prepare the request
      entity.setPath(
          url.getPath() + (String) message.getContextualProperty("org.apache.cxf.request.uri"));
      entity.setId(UUID.randomUUID().toString());
      uncorrelatedRequests.put(entity.getId(), new RequestResponse(entity));
    }