public AddMembershipListenerRequest() {
}
@Override
public Object call() throws Exception {
ClusterServiceImpl service = getService();
ClientEndpoint endpoint = getEndpoint();
String registrationId = service.addMembershipListener(new MembershipListenerImpl(endpoint));
String name = ClusterServiceImpl.SERVICE_NAME;
endpoint.setListenerRegistration(name, name, registrationId);
Collection<MemberImpl> memberList = service.getMemberList();
Collection<Data> response = new ArrayList<Data>(memberList.size());
for (MemberImpl member : memberList) {
response.add(serializationService.toData(member));
}
return new SerializableCollection(response);