From 3b855e85f744b958b5aa74a5a7bb33e76fdee57e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 9 Apr 2008 14:09:27 +0000 Subject: [PATCH] add ModifyPeer command git-svn-id: http://trooper/svn/projects/jSite/trunk@667 c3eda9e8-030b-0410-8277-bc7414b0a119 --- src/net/pterodactylus/util/fcp/ModifyPeer.java | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/net/pterodactylus/util/fcp/ModifyPeer.java diff --git a/src/net/pterodactylus/util/fcp/ModifyPeer.java b/src/net/pterodactylus/util/fcp/ModifyPeer.java new file mode 100644 index 0000000..ed1c035 --- /dev/null +++ b/src/net/pterodactylus/util/fcp/ModifyPeer.java @@ -0,0 +1,42 @@ +/** + * © 2008 INA Service GmbH + */ +package net.pterodactylus.util.fcp; + +/** + * The “ModifyPeer” request lets you modify certain properties of a peer. + * + * @author David Roden + * @version $Id$ + */ +public class ModifyPeer extends FcpMessage { + + /** + * Creates a new “ModifyPeer” request. All Boolean parameters may be null to + * not influence the current setting. + * + * @param nodeIdentifier + * The identifier of the node, i.e. name, identity, or IP address + * and port + * @param allowLocalAddresses + * Whether to allow local addresses from this node + * @param disabled + * Whether the node is disabled + * @param listenOnly + * Whether your node should not try to connect the node + */ + public ModifyPeer(String nodeIdentifier, Boolean allowLocalAddresses, Boolean disabled, Boolean listenOnly) { + super("ModifyPeer"); + setField("NodeIdentifier", nodeIdentifier); + if (allowLocalAddresses != null) { + setField("AllowLocalAddresses", String.valueOf(allowLocalAddresses)); + } + if (disabled != null) { + setField("IsDisabled", String.valueOf(disabled)); + } + if (listenOnly != null) { + setField("IsListenOnly", String.valueOf(listenOnly)); + } + } + +} -- 2.7.4