Class OncRpcEmbeddedPortmap.embeddedjportmap

  • All Implemented Interfaces:
    OncRpcDispatchable
    Enclosing class:
    OncRpcEmbeddedPortmap

    class OncRpcEmbeddedPortmap.embeddedjportmap
    extends jportmap
    Extend the portmap service so that it automatically takes itself out of service when the last ONC/RPC programs is deregistered.
    • Field Detail

      • serviceThread

        protected java.lang.Thread serviceThread
        Thread running the embedded portmap service.
    • Constructor Detail

      • embeddedjportmap

        public embeddedjportmap()
                         throws java.io.IOException,
                                OncRpcException
        Creates a new instance of an embeddable portmap service.
        Throws:
        java.io.IOException
        OncRpcException
    • Method Detail

      • unsetPort

        XdrBoolean unsetPort​(OncRpcServerIdent params)
        Deregister all port settings for a particular (program, version) for all transports (TCP, UDP, ...). This method basically falls back to the implementation provided by the jrpcgen superclass, but checks whether there are other ONC/RPC programs registered. If not, it signals itself to shut down the portmap service.
        Overrides:
        unsetPort in class jportmap
        Parameters:
        params - (program, version) to deregister. The protocol and port fields are not used.
        Returns:
        true if deregistration succeeded.