org.apache.hadoop.portmap
Interface PortmapInterface

All Known Implementing Classes:
RpcProgramPortmap

public interface PortmapInterface

Methods that need to be implemented to provide Portmap RPC program. See RFC 1833 for details.


Nested Class Summary
static class PortmapInterface.Procedure
           
 
Method Summary
 XDR dump(int xid, XDR in, XDR out)
          This procedure enumerates all entries in the port mapper's database.
 XDR getport(int xid, XDR in, XDR out)
          Given a program number "prog", version number "vers", and transport protocol number "prot", this procedure returns the port number on which the program is awaiting call requests.
 XDR nullOp(int xidd, XDR in, XDR out)
          This procedure does no work.
 XDR set(int xid, XDR in, XDR out)
          When a program first becomes available on a machine, it registers itself with the port mapper program on the same machine.
 XDR unset(int xid, XDR in, XDR out)
          When a program becomes unavailable, it should unregister itself with the port mapper program on the same machine.
 

Method Detail

nullOp

XDR nullOp(int xidd,
           XDR in,
           XDR out)
This procedure does no work. By convention, procedure zero of any protocol takes no parameters and returns no results.


set

XDR set(int xid,
        XDR in,
        XDR out)
When a program first becomes available on a machine, it registers itself with the port mapper program on the same machine. The program passes its program number "prog", version number "vers", transport protocol number "prot", and the port "port" on which it awaits service request. The procedure returns a boolean reply whose value is "TRUE" if the procedure successfully established the mapping and "FALSE" otherwise. The procedure refuses to establish a mapping if one already exists for the tuple "(prog, vers, prot)".


unset

XDR unset(int xid,
          XDR in,
          XDR out)
When a program becomes unavailable, it should unregister itself with the port mapper program on the same machine. The parameters and results have meanings identical to those of "PMAPPROC_SET". The protocol and port number fields of the argument are ignored.


getport

XDR getport(int xid,
            XDR in,
            XDR out)
Given a program number "prog", version number "vers", and transport protocol number "prot", this procedure returns the port number on which the program is awaiting call requests. A port value of zeros means the program has not been registered. The "port" field of the argument is ignored.


dump

XDR dump(int xid,
         XDR in,
         XDR out)
This procedure enumerates all entries in the port mapper's database. The procedure takes no parameters and returns a list of program, version, protocol, and port values.



Copyright © 2009 The Apache Software Foundation