/* (non-Javadoc)
@see com.emc.ecs.nfsclient.nfs.Nfs#wrapped_sendMkdir(com.emc.ecs.nfsclient.nfs.NfsMkdirRequest)
339457
public Nfs3MkdirResponse wrapped_sendMkdir(NfsMkdirRequest request) throws IOException {
        RpcResponseHandler<Nfs3MkdirResponse> responseHandler = new NfsResponseHandler<Nfs3MkdirResponse>() {
    
            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3MkdirResponse makeNewResponse() {
                return new Nfs3MkdirResponse();
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
1281017
private void sendAck()
   {
     if (tc.isEntryEnabled())
       SibTr.entry(tc, "sendAck");
     
     try
     {
       upControl.sendAckMessage(null, null, null, iack, priority, reliability, streamID, false);
     }
     catch (SIException e)
     {
       // FFDC
       FFDCFilter.processException(
         e,
         "com.ibm.ws.sib.processor.gd.InternalInputStream.sendAck",
         "1:161:1.42",
         this);
         
       SibTr.exception(tc, e);

       //TODO don't know what to do here - rethrow?!
     } 
     
     if (tc.isEntryEnabled())
       SibTr.exit(tc, "sendAck");
   }
935658
public NfsReaddirRequest makeReaddirRequest(byte[] directoryFileHandle, long cookie, long cookieverf, int count) throws FileNotFoundException {
        return new Nfs3ReaddirRequest(directoryFileHandle, cookie, cookieverf, count, _credential);
    }
288121
public Nfs3RenameResponse wrapped_sendRename(NfsRenameRequest request) throws IOException {
        NfsResponseHandler<Nfs3RenameResponse> responseHandler = new NfsResponseHandler<Nfs3RenameResponse>() {

            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3RenameResponse makeNewResponse() {
                return new Nfs3RenameResponse();
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
107719
private void sendDummyTakeMastershipResponse(long sourceHsid, long requestId, int partitionId, byte[] signatureBytes) {
        // msg type(1) + partition:int(4) + length:int(4) + signaturesBytes.length
        // requestId(8)
        int msgLen = 1 + 4 + 4 + signatureBytes.length + 8;
        ByteBuffer buf = ByteBuffer.allocate(msgLen);
        buf.put(ExportManager.TAKE_MASTERSHIP_RESPONSE);
        buf.putInt(partitionId);
        buf.putInt(signatureBytes.length);
        buf.put(signatureBytes);
        buf.putLong(requestId);
        BinaryPayloadMessage bpm = new BinaryPayloadMessage(new byte[0], buf.array());
        m_mbox.send(sourceHsid, bpm);
        if (exportLog.isDebugEnabled()) {
            exportLog.debug("Partition " + partitionId + " mailbox hsid (" +
                    CoreUtils.hsIdToString(m_mbox.getHSId()) +
                    ") send dummy TAKE_MASTERSHIP_RESPONSE message(" +
                    requestId + ") to " + CoreUtils.hsIdToString(sourceHsid));
        }
    }
1364190
public NfsReaddirResponse readdir(long cookie, long cookieverf, int count) throws IOException {
        return getNfs().wrapped_getReaddir(makeReaddirRequest(cookie, cookieverf, count));
    }
450693
public FileSender sendFile(String filePath, final Handler<AsyncResult<Void>> doneHandler) {
    final File file = new File(filePath);
    output.vertx().fileSystem().exists(file.getAbsolutePath(), new Handler<AsyncResult<Boolean>>() {
      @Override
      public void handle(AsyncResult<Boolean> result) {
        if (result.failed()) {
          new DefaultFutureResult<Void>(result.cause()).setHandler(doneHandler);
        } else if (!result.result()) {
          new DefaultFutureResult<Void>(new IOException("File not found.")).setHandler(doneHandler);
        } else {
          output.group("file", file.getName(), new Handler<OutputGroup>() {
            @Override
            public void handle(final OutputGroup group) {
              output.vertx().fileSystem().open(file.getAbsolutePath(), new Handler<AsyncResult<AsyncFile>>() {
                @Override
                public void handle(AsyncResult<AsyncFile> result) {
                  if (result.failed()) {
                    new DefaultFutureResult<Void>(result.cause()).setHandler(doneHandler);
                  } else {
                    doSendFile(result.result(), group, doneHandler);
                  }
                }
              });
            }
          });
        }
      }
    });
    return this;
  }
1030157
void sendDeltaDoWorkRejected()
   {
      doWorkRejected.incrementAndGet();

      if (trace)
         log.tracef("sendDeltaDoWorkRejected: %s", workManagers);

      if (own != null && transport != null && transport.isInitialized())
      {
         for (Address address : workManagers)
         {
            if (!own.equals(address))
               transport.deltaDoWorkRejected(address);
         }
      }
   }
1107695
public Nfs3CreateResponse sendCreate(NfsCreateRequest request) throws IOException {
        Nfs3CreateResponse response = new Nfs3CreateResponse();
        _rpcWrapper.callRpcNaked(request, response);
        return response;
    }
914323
protected void sendDirectory(HttpServletRequest request, HttpServletResponse response, Resource resource, boolean parent) throws IOException
    {
        if (!_dirAllowed)
        {
            response.sendError(HttpResponse.__403_Forbidden);
            return;
        }

        byte[] data = null;
        if (resource instanceof CachedResource)
            data = ((CachedResource) resource).getCachedData();

        if (data == null)
        {
            String base = URI.addPaths(request.getRequestURI(), "/");
            String dir = resource.getListHTML(base, parent);
            if (dir == null)
            {
                response.sendError(HttpResponse.__403_Forbidden, "No directory");
                return;
            }
            data = dir.getBytes("UTF-8");
            if (resource instanceof CachedResource)
                ((CachedResource) resource).setCachedData(data);
        }

        response.setContentType("text/html; charset=UTF-8");
        response.setContentLength(data.length);

        if (!request.getMethod().equals(HttpRequest.__HEAD))
            response.getOutputStream().write(data);
    }
990438
public void logMkDir(String path, INode newNode) {
    MkdirOp op = MkdirOp.getInstance();
    op.set(newNode.getId(), path, newNode.getModificationTime(), 
        newNode.getPermissionStatus());
    logEdit(op);
  }
657184
public Nfs3ReaddirResponse wrapped_getReaddir(NfsReaddirRequest request) throws IOException {
        NfsResponseHandler<Nfs3ReaddirResponse> responseHandler = new NfsResponseHandler<Nfs3ReaddirResponse>() {

            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3ReaddirResponse makeNewResponse() {
                return new Nfs3ReaddirResponse();
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
406574
function _recursiveMkDir(dir) {
  if (!fs.existsSync(dir)) {
    _recursiveMkDir(path.dirname(dir));
    fs.mkdirSync(dir);
  }
}
1051313
public void sendAck(Request arg0) throws SipException {
		if (tracer.isInfoEnabled()) {
			tracer.info(this+" sending ACK:\n"+arg0);
		}
		wrappedDialog.sendAck(arg0);
	}
643080
public NfsMknodRequest makeMknodRequest(NfsType type, NfsSetAttributes attributes, long[] rdev) throws IOException {
        return getNfs().makeMknodRequest(getParentFile().getFileHandle(), getName(), type, attributes, rdev);
    }
1270608
public Nfs3LookupResponse wrapped_getLookup(NfsLookupRequest request) throws IOException {
        RpcResponseHandler<Nfs3LookupResponse> responseHandler = new NfsResponseHandler<Nfs3LookupResponse>() {

            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3LookupResponse makeNewResponse() {
                return new Nfs3LookupResponse();
            }

            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.nfs.NfsResponseHandler#checkResponse(com.emc.ecs.nfsclient.rpc.RpcRequest)
             */
            public void checkResponse(RpcRequest request) throws IOException {
                // If the root file handle is bad, we should mount again.
                if ((getResponse().getState() == NfsStatus.NFS3ERR_BADHANDLE.getValue())
                 && (((NfsLookupRequest)request).getFileHandle() == _rootFileHandle)) {
                    prepareRootFhAndNfsPort();
                }
                super.checkResponse(request);
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
1352857
void sendDirectory(HttpRequest request,
                       HttpResponse response,
                       Resource resource,
                       boolean parent)
        throws IOException
    {
        if (!_dirAllowed)
        {
            response.sendError(HttpResponse.__403_Forbidden);
            return;
        }
        
        request.setHandled(true);
        
        if(log.isDebugEnabled())log.debug("sendDirectory: "+resource);
        byte[] data=null;
        if (resource instanceof CachedResource)
            data=((CachedResource)resource).getCachedData();
        
        if (data==null)
        {
            String base = URI.addPaths(request.getPath(),"/");
            String dir = resource.getListHTML(URI.encodePath(base),parent);
            if (dir==null)
            {
                response.sendError(HttpResponse.__403_Forbidden,
                                   "No directory");
                return;
            }
            data=dir.getBytes("UTF8");
            if (resource instanceof CachedResource)
                ((CachedResource)resource).setCachedData(data);
        }
        
        response.setContentType("text/html; charset=UTF8");
        response.setContentLength(data.length);
        
        if (request.getMethod().equals(HttpRequest.__HEAD))
        {
            response.commit();
            return;
        }
        
        response.getOutputStream().write(data,0,data.length);
        response.commit();
    }