Closed Fahad-alkamli closed 4 years ago
when trying to use options using the example :
DiscoveryOptions options = DiscoveryOptions.builder() .intervalBetweenRequests(10000L) // optional interval between requests, defaults to 10 000 milliseconds .maxWaitTimeSeconds(3) // optional max wait time between req and response, defaults to 3 seconds .userAgent("Resourcepool SSDP Client") // optional custom user-agent, defaults to "Resourcepool SSDP Client" .build();
The problem is the build method is not static ? so who am I to call it just like that. It needs to be static to be called like that.
or at least the code could be something like this: DiscoveryOptions something=new DiscoveryOptions(); DiscoveryOptions options = something.builder() .intervalBetweenRequests(10000L) // optional interval between requests, defaults to 10 000 milliseconds .maxWaitTimeSeconds(3) // optional max wait time between req and response, defaults to 3 seconds .userAgent("Resourcepool SSDP Client") // optional custom user-agent, defaults to "Resourcepool SSDP Client" .build();
Thanks!
Hello Fahad, yes, you're right, just missed a static indicator on the builder() method. I just made this, will publish a fix today on central.
Thanks !
when trying to use options using the example :
DiscoveryOptions options = DiscoveryOptions.builder() .intervalBetweenRequests(10000L) // optional interval between requests, defaults to 10 000 milliseconds .maxWaitTimeSeconds(3) // optional max wait time between req and response, defaults to 3 seconds .userAgent("Resourcepool SSDP Client") // optional custom user-agent, defaults to "Resourcepool SSDP Client" .build();
The problem is the build method is not static ? so who am I to call it just like that. It needs to be static to be called like that.