/*
 * Automatically generated by jrpcgen 1.0.5 on 4/21/25, 8:04 PM
 * jrpcgen is part of the "Remote Tea" ONC/RPC package for Java
 * See http://acplt.org/ks/remotetea.html for details
 */
import org.acplt.oncrpc.*;
import java.io.IOException;

import java.net.InetAddress;

import org.acplt.oncrpc.server.*;

/**
 */
public abstract class ChatServerServerStub extends OncRpcServerStub implements OncRpcDispatchable {

    public ChatServerServerStub()
           throws OncRpcException, IOException {
        this(0);
    }

    public ChatServerServerStub(int port)
           throws OncRpcException, IOException {
        this(null, port);
    }

    public ChatServerServerStub(InetAddress bindAddr, int port)
           throws OncRpcException, IOException {
        info = new OncRpcServerTransportRegistrationInfo [] {
            new OncRpcServerTransportRegistrationInfo(ChatServer.CHAT_PROG, 1),
        };
        transports = new OncRpcServerTransport [] {
            new OncRpcUdpServerTransport(this, bindAddr, port, info, 32768),
            new OncRpcTcpServerTransport(this, bindAddr, port, info, 32768)
        };
    }

    public void dispatchOncRpcCall(OncRpcCallInformation call, int program, int version, int procedure)
           throws OncRpcException, IOException {
        if ( version == 1 ) {
            switch ( procedure ) {
            case 1: {
                XdrString args$ = new XdrString();
                call.retrieveCall(args$);
                CONNEXION_1(args$.stringValue());
                call.reply(XdrVoid.XDR_VOID);
                break;
            }
            case 2: {
                XdrString args$ = new XdrString();
                call.retrieveCall(args$);
                ENVOI_1(args$.stringValue());
                call.reply(XdrVoid.XDR_VOID);
                break;
            }
            default:
                call.failProcedureUnavailable();
            }
        } else {
            call.failProcedureUnavailable();
        }
    }

    public abstract void CONNEXION_1(String arg1);

    public abstract void ENVOI_1(String arg1);

}
// End of ChatServerServerStub.java
