MetadataServiceClientImpl implements IMetadataServiceClient { @Override public List<PolicyDefinition> listPolicies() { return list(METADATA_POLICIES_PATH, new GenericType<List<PolicyDefinition>>() { }); } MetadataServiceClientImpl(Config config);  MetadataServiceClientImpl(String host, int port, String context); @Override void close(); @Override List<SpoutSpec> listSpoutMetadata(); @Override List<StreamingCluster> listClusters(); @Override List<PolicyDefinition> listPolicies(); @Override List<StreamDefinition> listStreams(); @Override List<Kafka2TupleMetadata> listDataSources(); @Override List<Publishment> listPublishment(); @Override ScheduleState getVersionedSpec(String version); @Override ScheduleState getVersionedSpec(); @Override void addScheduleState(ScheduleState state); @Override List<Topology> listTopologies(); @Override void addStreamingCluster(StreamingCluster cluster); @Override void addStreamingClusters(List<StreamingCluster> clusters); @Override void addTopology(Topology t); @Override void addTopologies(List<Topology> topologies); @Override void addPolicy(PolicyDefinition policy); @Override void addPolicies(List<PolicyDefinition> policies); @Override void addStreamDefinition(StreamDefinition streamDef); @Override void addStreamDefinitions(List<StreamDefinition> streamDefs); @Override void addDataSource(Kafka2TupleMetadata k2t); @Override void addDataSources(List<Kafka2TupleMetadata> k2ts); @Override void addPublishment(Publishment pub); @Override void addPublishments(List<Publishment> pubs); @Override void clear(); @Override void clearScheduleState(int maxCapacity); @Override List<AlertPublishEvent> listAlertPublishEvent(); @Override void addAlertPublishEvent(AlertPublishEvent event); @Override void addAlertPublishEvents(List<AlertPublishEvent> events); static final String EAGLE_CORRELATION_SERVICE_PORT; static final String EAGLE_CORRELATION_SERVICE_HOST; }
@SuppressWarnings("resource") @Ignore @Test public void test() throws Exception { MetadataServiceClientImpl impl = new MetadataServiceClientImpl("localhost", 58080, "/api/metadata/policies"); List<PolicyDefinition> policies = impl.listPolicies(); ObjectMapper mapper = new ObjectMapper(); String ret = mapper.writeValueAsString(policies); System.out.println(ret); }