(final String group)
| 224 | |
| 225 | |
| 226 | public synchronized List<PingData> getMembers(final String group) throws Exception { |
| 227 | List<PingData> retval=new ArrayList<PingData>(); |
| 228 | try { |
| 229 | |
| 230 | if(!isConnected() || input == null) throw new Exception ("not connected"); |
| 231 | // we might get a spurious SUSPECT message from the router, just ignore it |
| 232 | if(input.available() > 0) // fixes https://jira.jboss.org/jira/browse/JGRP-1151 |
| 233 | input.skipBytes(input.available()); |
| 234 | |
| 235 | GossipData request=new GossipData(GossipRouter.GOSSIP_GET, group, null); |
| 236 | request.writeTo(output); |
| 237 | output.flush(); |
| 238 | |
| 239 | short num_rsps=input.readShort(); |
| 240 | for(int i=0; i < num_rsps; i++) { |
| 241 | PingData rsp=new PingData(); |
| 242 | rsp.readFrom(input); |
| 243 | retval.add(rsp); |
| 244 | } |
| 245 | } |
| 246 | catch(Exception e) { |
| 247 | connectionStateChanged(ConnectionStatus.CONNECTION_BROKEN); |
| 248 | throw new Exception("Connection to " + getGossipRouterAddress() + " broken. Could not send GOSSIP_GET request", e); |
| 249 | } |
| 250 | return retval; |
| 251 | } |
| 252 | |
| 253 | public InetSocketAddress getGossipRouterAddress() { |
| 254 | return new InetSocketAddress(router_host, router_port); |
nothing calls this directly
no test coverage detected