Examples of XDR


Examples of org.apache.hadoop.oncrpc.XDR

  public static PortmapMapping mapping(XDR xdr) {
    return PortmapMapping.deserialize(xdr);
  }

  public static XDR create(PortmapMapping mapping) {
    XDR request = new XDR();
    RpcCall.write(request,
        RpcUtil.getNewXid(String.valueOf(RpcProgramPortmap.PROGRAM)),
        RpcProgramPortmap.PROGRAM, RpcProgramPortmap.VERSION,
        Procedure.PMAPPROC_SET.getValue());
    request.writeInt(AuthFlavor.AUTH_NONE.getValue());
    Credentials credential = new CredentialsNone();
    credential.write(request);
    request.writeInt(AuthFlavor.AUTH_NONE.getValue());
    Verifier verifier = new VerifierNone();
    verifier.write(request);
    return mapping.serialize(request);
  }
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.