import net.pterodactylus.fcp.FcpAdapter;
import net.pterodactylus.fcp.FcpConnection;
import net.pterodactylus.fcp.FcpListener;
+import net.pterodactylus.fcp.FcpMessage;
import net.pterodactylus.fcp.GenerateSSK;
import net.pterodactylus.fcp.GetConfig;
import net.pterodactylus.fcp.GetFailed;
public void run() throws IOException {
fcpConnection.connect();
ClientHello clientHello = new ClientHello(name);
- fcpConnection.sendMessage(clientHello);
+ sendMessage(clientHello);
WatchGlobal watchGlobal = new WatchGlobal(true);
- fcpConnection.sendMessage(watchGlobal);
+ sendMessage(watchGlobal);
}
/**
public void run() throws IOException {
ClientGet clientGet = new ClientGet(uri, identifier);
clientGet.setFilterData(filterData);
- fcpConnection.sendMessage(clientGet);
+ sendMessage(clientGet);
}
@Override
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new ListPeers(identifier, withMetadata, withVolatile));
+ sendMessage(new ListPeers(identifier, withMetadata, withVolatile));
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(addPeer);
+ sendMessage(addPeer);
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new ModifyPeer(peer.getIdentity(), allowLocalAddresses, disabled, listenOnly));
+ sendMessage(new ModifyPeer(peer.getIdentity(), allowLocalAddresses, disabled, listenOnly));
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new RemovePeer(peer.getIdentity()));
+ sendMessage(new RemovePeer(peer.getIdentity()));
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new ListPeerNotes(peer.getIdentity()));
+ sendMessage(new ListPeerNotes(peer.getIdentity()));
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new ModifyPeerNote(peer.getIdentity(), noteText, noteType));
+ sendMessage(new ModifyPeerNote(peer.getIdentity(), noteText, noteType));
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new GenerateSSK());
+ sendMessage(new GenerateSSK());
}
/**
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new ListPersistentRequests());
+ sendMessage(new ListPersistentRequests());
}
/**
fcpPluginMessage.setDataLength(dataLength);
fcpPluginMessage.setPayloadInputStream(dataInputStream);
}
- fcpConnection.sendMessage(fcpPluginMessage);
+ sendMessage(fcpPluginMessage);
}
/**
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
GetNode getNodeMessage = new GetNode(giveOpennetRef, withPrivate, withVolatile);
- fcpConnection.sendMessage(getNodeMessage);
+ sendMessage(getNodeMessage);
}
/**
getConfig.setWithExpertFlag(true);
getConfig.setWithForceWriteFlag(true);
getConfig.setWithSortOrder(true);
- fcpConnection.sendMessage(getConfig);
+ sendMessage(getConfig);
}
@Override
*/
public abstract void run() throws IOException;
+ protected void sendMessage(FcpMessage fcpMessage) throws IOException {
+ fcpConnection.sendMessage(fcpMessage);
+ }
+
/**
* Signals completion of the command processing.
*/