out.println("            call.failProcedureUnavailable();");
out.println("            call.failProgramUnavailable();");
    public static void dumpServer(JrpcgenProgramInfo programInfo) {        //        // Create new source code file containing a Java class representing        // the XDR struct.        // In case we have several programs defines, build the source code        // file name from the program's name (this case is identified by a        // null clientClass name).        //        String serverClass = jrpcgen.serverClass;        if ( serverClass == null ) {            serverClass = baseClassname + "_" + programInfo.programId + "_ServerStub";        }        PrintWriter out = createJavaSourceFile(serverClass);        out.println("import java.net.InetAddress;");        out.println();        out.println("import org.acplt.oncrpc.server.*;");        out.println();        out.println("/**");        out.println(" */");        out.println("public abstract class " + serverClass +                    " extends OncRpcServerStub implements OncRpcDispatchable {");        out.println();        //        // Generate constructor(s)...        //        out.println("    public " + serverClass + "()");        out.println("           throws OncRpcException, IOException {");        out.println("        this(0);");        out.println("    }");        out.println();        out.println("    public " + serverClass + "(int port)");        out.println("           throws OncRpcException, IOException {");        out.println("        this(null, port);");        out.println("    }");        out.println();        out.println("    public " + serverClass + "(InetAddress bindAddr, int port)");        out.println("           throws OncRpcException, IOException {");        //        // For every version specified, create both UDP and TCP-based        // transports.        //        out.println("        info = new OncRpcServerTransportRegistrationInfo [] {");        int versionSize = programInfo.versions.size();        for ( int versionIdx = 0; versionIdx < versionSize; ++versionIdx ) {            JrpcgenVersionInfo versionInfo = (JrpcgenVersionInfo)                programInfo.versions.elementAt(versionIdx);            out.println("            new OncRpcServerTransportRegistrationInfo("                        + baseClassname + "." + programInfo.programId + ", "                        + versionInfo.versionNumber + "),");        }        out.println("        };");        out.println("        transports = new OncRpcServerTransport [] {");        out.println("            new OncRpcUdpServerTransport(this, bindAddr, port, info, 32768),");        out.println("            new OncRpcTcpServerTransport(this, bindAddr, port, info, 32768)");        out.println("        };");        //        // Finish constructor method...        //        out.println("    }");        out.println();        //        // Generate dispatcher code...        //        out.println("    public void dispatchOncRpcCall(OncRpcCallInformation call, int program, int version, int procedure)");        out.println("           throws OncRpcException, IOException {");        for ( int versionIdx = 0; versionIdx < versionSize; ++versionIdx ) {            JrpcgenVersionInfo versionInfo = (JrpcgenVersionInfo)                programInfo.versions.elementAt(versionIdx);            out.print(versionIdx == 0 ? "        " : "        } else ");            out.println("if ( version == " + versionInfo.versionNumber + " ) {");            int procSize = versionInfo.procedures.size();            out.println("            switch ( procedure ) {");            for ( int procIdx = 0; procIdx < procSize; ++procIdx ) {                //                // Emit case arms for every procedure defined. We have to                // take care that the procedure number might be a constant                // comming from an enumeration: in this case we need also to                // dump the enclosure.                //                JrpcgenProcedureInfo procInfo = (JrpcgenProcedureInfo)                    versionInfo.procedures.elementAt(procIdx);                out.println("            case " + checkForEnumValue(procInfo.procedureNumber) + ": {");                dumpServerStubMethodCall(out, procInfo);                out.println("                break;");                out.println("            }");            }            out.println("            default:");            out.println("                call.failProcedureUnavailable();");            out.println("            }");        }        out.println("        } else {");        out.println("            call.failProcedureUnavailable();");        out.println("        }");        out.println("    }");        out.println();        //        // Generate the stub methods for all specified remote procedures.        //        for ( int versionIdx = 0; versionIdx < versionSize; ++versionIdx ) {            JrpcgenVersionInfo versionInfo = (JrpcgenVersionInfo)                programInfo.versions.elementAt(versionIdx);            dumpServerStubMethods(out, versionInfo);        }        //        // Close class...done!        //        out.println("}");        closeJavaSourceFile();    }