If you are implementing a client without function calls, use one of
the following constructors:
public BrokerClient(String clientName,
public BrokerClient(String clientBaseName,
int brokerPort)Whose only difference is how the host the broker is running on is specified.
public BrokerClient(String moduleName,
boolean serve) throws UnknownHostException, NumberFormatException
public BrokerClient(String n,
boolean serve)For these constructors, an object implementing the ServiceProvider interface must be specified. It will be called from a new thread for each incoming function/procedure call. The two different methods are for inline and multiline calls.
public interface ServiceProvider
Object brokerCall( String data ) throws BrokerException;
Object brokerCall( Vector data ) throws BrokerException;
}Note that the BrokerClient will not actually connect to the Broker until you tell it to with the connect method.
© Copyright 1997 Erland Lewin and the members of the Center for Speech Technology