If you are implementing a client without function calls, use one of
the following constructors:
public BrokerClient(String clientName,
InetAddress brokerHost,
int brokerPort)
public BrokerClient(String clientBaseName,
String brokerHost,
int brokerPort)Whose only difference is how the host the broker is running on is specified.
public BrokerClient(String moduleName,
String hostName,
String portName,
ServiceProvider provider,
boolean serve) throws UnknownHostException, NumberFormatException
public BrokerClient(String n,
InetAddress h,
int p,
ServiceProvider provider,
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