コード例 #1
0
  public void execute(HereIsLocalConsumersStatusResponseTO response, ServiceManager manager) {
    ServiceID clientID = ServiceID.parse(response.getClientAddress());
    PeerStatusProviderClient client =
        (PeerStatusProviderClient) manager.getStub(clientID, PeerStatusProviderClient.class);

    client.hereIsLocalConsumersStatus(
        ServiceID.parse(response.getPeerAddress()), response.getLocalConsumersInfo());
  }
コード例 #2
0
  public void execute(DSHereAreDiscoveryServicesResponseTO response, ServiceManager manager) {
    Set<DiscoveryServiceInfo> discoveryServices = response.getDiscoveryServices();

    List<ServiceID> dsIDs = new ArrayList<ServiceID>();

    for (DiscoveryServiceInfo ds : discoveryServices) {
      dsIDs.add(ServiceID.parse(ds.getDsAddress()));
    }

    DiscoveryService ds =
        (DiscoveryService)
            manager.getStub(ServiceID.parse(response.getStubAddress()), DiscoveryService.class);

    ds.hereAreDiscoveryServices(dsIDs);
  }