Skip to content

Commit

Permalink
Merge pull request #1212 from LittleBaiBai/add-filter-to-replication-…
Browse files Browse the repository at this point in the history
…client

add ClientFilter to HttpReplicationClient
  • Loading branch information
elandau authored Jun 7, 2019
2 parents c416de5 + 8325086 commit e71be8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ public interface HttpReplicationClient extends EurekaHttpClient {
EurekaHttpResponse<Void> statusUpdate(String asgName, ASGStatus newStatus);

EurekaHttpResponse<ReplicationListResponse> submitBatchUpdates(ReplicationList replicationList);

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.EurekaClientConfig;
import com.netflix.discovery.endpoint.EndpointUtils;
import com.netflix.discovery.shared.Application;
import com.netflix.eureka.EurekaServerConfig;
import com.netflix.eureka.registry.PeerAwareInstanceRegistry;
import com.netflix.eureka.resources.ServerCodecs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.WebResource.Builder;
import com.sun.jersey.api.client.filter.ClientFilter;
import com.sun.jersey.client.apache4.ApacheHttpClient4;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -126,6 +127,10 @@ public EurekaHttpResponse<ReplicationListResponse> submitBatchUpdates(Replicatio
}
}

public void addReplicationClientFilter(ClientFilter clientFilter) {
jerseyApacheClient.addFilter(clientFilter);
}

@Override
public void shutdown() {
super.shutdown();
Expand Down

0 comments on commit e71be8c

Please sign in to comment.