// create communication channel
SerializingMessageService msgService = null;
try {
msgService = new SerializingMessageService(TcpMessageTransport.class);
msgService.connect(new TcpConnectInfo(JOptionPane.showInputDialog("Enter the host IP adress of the MasterBroker:", "localhost"), Integer.parseInt(JOptionPane.showInputDialog("Enter the host port of the MasterBroker:", "4444"))));
msgService.sendMessage(new ConnectionRequest(ConnectionRequest.REQUESTTYPE_PRODUCER));
} catch (Exception e) {
e.printStackTrace();
}
return msgService;
}