2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp;
7 * The “ModifyPeer” request lets you modify certain properties of a peer.
9 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
12 public class ModifyPeer extends FcpMessage {
15 * Creates a new “ModifyPeer” request. All Boolean parameters may be null to
16 * not influence the current setting.
18 * @param nodeIdentifier
19 * The identifier of the node, i.e. name, identity, or IP address
21 * @param allowLocalAddresses
22 * Whether to allow local addresses from this node
24 * Whether the node is disabled
26 * Whether your node should not try to connect the node
28 public ModifyPeer(String nodeIdentifier, Boolean allowLocalAddresses, Boolean disabled, Boolean listenOnly) {
30 setField("NodeIdentifier", nodeIdentifier);
31 if (allowLocalAddresses != null) {
32 setField("AllowLocalAddresses", String.valueOf(allowLocalAddresses));
34 if (disabled != null) {
35 setField("IsDisabled", String.valueOf(disabled));
37 if (listenOnly != null) {
38 setField("IsListenOnly", String.valueOf(listenOnly));