Skip to content

Commit

Permalink
fix(coap-core): Expect generic Filter in CoapServerBuilder methods (#103
Browse files Browse the repository at this point in the history
)
  • Loading branch information
akolosov-n authored Sep 9, 2024
1 parent 211507b commit 40eccb1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public final class CoapServerBuilder {
private int maxMessageSize = 1152; //default
private Service<CoapRequest, CoapResponse> route = RouterService.NOT_FOUND_SERVICE;
private int maxQueueSize = 100;
private Filter.SimpleFilter<CoapRequest, CoapResponse> outboundFilter = Filter.identity();
private Filter.SimpleFilter<CoapRequest, CoapResponse> routeFilter = Filter.identity();
private Filter.SimpleFilter<CoapRequest, CoapResponse> inboundRequestFilter = Filter.identity();
private Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> outboundFilter = Filter.identity();
private Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> routeFilter = Filter.identity();
private Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> inboundRequestFilter = Filter.identity();
private NotificationsReceiver notificationsReceiver = NotificationsReceiver.REJECT_ALL;
private ObservationsStore observationStore = ObservationsStore.ALWAYS_EMPTY;
private RequestTagSupplier requestTagSupplier = RequestTagSupplier.createSequential();
Expand Down Expand Up @@ -115,17 +115,17 @@ public CoapServerBuilder route(RouterService.RouteBuilder routeBuilder) {
return route(routeBuilder.build());
}

public CoapServerBuilder routeFilter(Filter.SimpleFilter<CoapRequest, CoapResponse> routeFilter) {
public CoapServerBuilder routeFilter(Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> routeFilter) {
this.routeFilter = requireNonNull(routeFilter);
return this;
}

public CoapServerBuilder inboundRequestFilter(Filter.SimpleFilter<CoapRequest, CoapResponse> inboundRequestFilter) {
public CoapServerBuilder inboundRequestFilter(Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> inboundRequestFilter) {
this.inboundRequestFilter = requireNonNull(inboundRequestFilter);
return this;
}

public CoapServerBuilder outboundFilter(Filter.SimpleFilter<CoapRequest, CoapResponse> outboundFilter) {
public CoapServerBuilder outboundFilter(Filter<CoapRequest, CoapResponse, CoapRequest, CoapResponse> outboundFilter) {
this.outboundFilter = requireNonNull(outboundFilter);
return this;
}
Expand Down

0 comments on commit 40eccb1

Please sign in to comment.