teragrep / cfe_31

0 stars 0 forks source link

Create send methods for HostIPPayload and HostInterfacePayload classes #42

Closed MoonBow-1 closed 7 months ago

MoonBow-1 commented 8 months ago

Description

Those classes currently don't have their own send methods, but are sent from Host class in a loop

MoonBow-1 commented 7 months ago

Before:

for (final String ip : ipAddresses) {
    final HostIPPayload hostIPPayload = new HostIPPayload(ip, hostId);

    final JsonRequest jsonRequest = new JsonRequest(
    ...
    );
    client.sendRequest(jsonRequest);
}

After:

for (final String ip : ipAddresses) {
    new HostIPPayload(ip, hostId)
        .send(client);
}
MoonBow-1 commented 7 months ago

Methods that send IPs and Interfaces have also been made private