Client400(final String connectString) { conf = new org.apache.hw_v4_0_0.hedwig.client.conf.ClientConfiguration() { @Override protected org.apache.hw_v4_0_0.hedwig.util.HedwigSocketAddress getDefaultServerHedwigSocketAddress() { return new org.apache.hw_v4_0_0.hedwig.util.HedwigSocketAddress(connectString); } }; client = new org.apache.hw_v4_0_0.hedwig.client.HedwigClient(conf); publisher = client.getPublisher(); subscriber = client.getSubscriber(); }
void close() throws Exception { if (null != client) { client.close(); } }