/*
 * 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 ChatClientServerStub extends OncRpcServerStub implements OncRpcDispatchable {

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

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

    public ChatClientServerStub(InetAddress bindAddr, int port)
           throws OncRpcException, IOException {
        info = new OncRpcServerTransportRegistrationInfo [] {
            new OncRpcServerTransportRegistrationInfo(ChatClient.CLIENT_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$);
                RECEPTION_1(args$.stringValue());
                call.reply(XdrVoid.XDR_VOID);
                break;
            }
            default:
                call.failProcedureUnavailable();
            }
        } else {
            call.failProcedureUnavailable();
        }
    }

    public abstract void RECEPTION_1(String arg1);

}
// End of ChatClientServerStub.java
