in listener/src/main/java/org/apache/geode_examples/listener/Example.java [37:52]
public static void main(String[] args) {
// connect to the locator using default port 10334
ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 10334)
.set("log-level", "WARN").create();
Example example = new Example();
// create a local region that matches the server region
ClientRegionFactory<Integer, String> clientRegionFactory =
cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
clientRegionFactory.addCacheListener(new ExampleCacheListener());
Region<Integer, String> region = clientRegionFactory.create("example-region");
example.putEntries(region);
cache.close();
}