Package net.jini.jeri

Examples of net.jini.jeri.OutboundRequest


            Util.log(Util.CALLS,"Enter "
              + "Endpoint.newRequest(connectionEndpoint,context)");
            Util.log(Util.STACK);
            ReadCallback rcb = null;
            WriteCallback wcb = (WriteCallback) Bridge.writeCallbackLocal.get();
            OutboundRequest or = (OutboundRequest) requests.get(index);
            if (wcb != null) {
                rcb = wcb.writeCallback(or, constraints);
            }
            ObjectOutputStream oos =
                new ObjectOutputStream(or.getRequestOutputStream());
            oos.writeObject(new MarshalledObject(rcb));
            oos.flush();
            Util.log(Util.RETURN, "returned OutboundRequest: " + or);
            Util.log(Util.CALLS, "Leaving Endpoint.newRequest");
            index++;
View Full Code Here


      if (!hasNext()) {
    throw new NoSuchElementException();
      }
      first = false;
      mux = connect(handle);
      OutboundRequest req = mux.newRequest();
      OutboundRequest sreq = null;
      try {
    Connection c = mux.getConnection();
    c.writeRequestData(handle, req.getRequestOutputStream());
    sreq = new Outbound(req, c, handle);
      } finally {
View Full Code Here

      }
      first = false;
      mux = null;
      connectPending();
      mux = connect(handle);
      OutboundRequest req = mux.newRequest();
      OutboundRequest sreq = null;
      try {
    Connection c = mux.getConnection();
    c.writeRequestData(handle, req.getRequestOutputStream());
    sreq = new Outbound(req, c, handle);
      } finally {
View Full Code Here

  throws IOException
    {
  final Constraints.Distilled distilled =
      Constraints.distill(constraints, false);

  final OutboundRequest request = nextRequest(distilled);

  // must wrap to provide getUnfulfilledConstraints implementation
  return new OutboundRequest() {
      public void populateContext(Collection context) {
    request.populateContext(context);
      }
      public InvocationConstraints getUnfulfilledConstraints() {
    return distilled.getUnfulfilledConstraints();
      }
      public OutputStream getRequestOutputStream() {
    return request.getRequestOutputStream();
      }
      public InputStream getResponseInputStream() {
    return request.getResponseInputStream();
      }
      public boolean getDeliveryStatus() {
    return request.getDeliveryStatus();
      }
      public void abort() { request.abort(); }
  };
    }
View Full Code Here

   * with the specified call context, and sets the idle time to 0.
   */
  OutboundRequest newRequest(CallContext callContext)
      throws IOException
  {
      OutboundRequest request = new HttpsOutboundRequest(
    httpClient.newRequest(), this, callContext);
      idleTime = 0;
      return request;
  }
View Full Code Here

          connection = info.connect(callContext);
          timeLastVerified = System.currentTimeMillis();
      }
        }
    }
    OutboundRequest request = connection.newRequest(callContext);
    ok = true;
    logger.log(Level.FINE, "using {0}", connection);
    return request;
      } finally {
    if (!ok) {
View Full Code Here

      if (!hasNext()) {
    throw new NoSuchElementException();
      }
      first = false;
      mux = connect(handle);
      OutboundRequest req = mux.newRequest();
      OutboundRequest sreq = null;
      try {
    Connection c = mux.getConnection();
    c.writeRequestData(handle, req.getRequestOutputStream());
    sreq = new Outbound(req, c, handle);
      } finally {
View Full Code Here

      }
      return null;
  }

  private Object doTest() throws IOException {
      OutboundRequest outbound;
      checkerMap.put(requestMsg, this);

      /* test endpoint.newRequest(...) */
      final PrivilegedExceptionAction pact =
    new PrivilegedExceptionAction() {
      public Object run() throws IOException {
          OutboundRequestIterator riter =
        clientEndpoint.newRequest(clientConstraints);
          if (!riter.hasNext()) {
        return "no request in the requestIter: " +
            riter;
          }

          OutboundRequest req = riter.next();
          if (riter.hasNext()) {
        return "more than one request in " +
            "requestIter: " + riter;
          }

View Full Code Here

  throws IOException
    {
  final Constraints.Distilled distilled =
      Constraints.distill(constraints, false);

  final OutboundRequest request = nextRequest(distilled);

  // must wrap to provide getUnfulfilledConstraints implementation
  return new OutboundRequest() {
      public void populateContext(Collection context) {
    request.populateContext(context);
      }
      public InvocationConstraints getUnfulfilledConstraints() {
    return distilled.getUnfulfilledConstraints();
      }
      public OutputStream getRequestOutputStream() {
    return request.getRequestOutputStream();
      }
      public InputStream getResponseInputStream() {
    return request.getResponseInputStream();
      }
      public boolean getDeliveryStatus() {
    return request.getDeliveryStatus();
      }
      public void abort() { request.abort(); }
  };
    }
View Full Code Here

    /**
     *
     */
    OutboundRequest getOutboundRequest() {
  assert role == CLIENT;
  return new OutboundRequest() {
      public void populateContext(Collection context) {
    ((MuxClient) mux).populateContext(context);
      }
      public InvocationConstraints getUnfulfilledConstraints() {
    /*
 
View Full Code Here

TOP

Related Classes of net.jini.jeri.OutboundRequest

Copyright © 2018 www.massapicom. 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.