* if an FCP error occurs
*/
public void connect() throws IOException, FcpException {
- ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() {
+ new ExtendedFcpAdapter() {
/**
* {@inheritDoc}
public void receivedNodeHello(FcpConnection fcpConnection, NodeHello nodeHello) {
completionLatch.countDown();
}
- };
- fcpListener.execute();
+ }.execute();
}
/**
*/
public Set<Peer> getPeers(final boolean withMetadata, final boolean withVolatile) throws IOException, FcpException {
final Set<Peer> peers = new HashSet<Peer>();
- ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() {
+ new ExtendedFcpAdapter() {
/**
* {@inheritDoc}
public void receivedEndListPeers(FcpConnection fcpConnection, EndListPeers endListPeers) {
completionLatch.countDown();
}
- };
- fcpListener.execute();
+ }.execute();
return peers;
}
* if an FCP error occurs
*/
private void addPeer(final AddPeer addPeer) throws IOException, FcpException {
- ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() {
+ new ExtendedFcpAdapter() {
/**
* {@inheritDoc}
public void receivedPeer(FcpConnection fcpConnection, Peer peer) {
completionLatch.countDown();
}
- };
- fcpListener.execute();
+ }.execute();
}
/**
* if an FCP error occurs
*/
public void modifyPeer(final Peer peer, final Boolean allowLocalAddresses, final Boolean disabled, final Boolean listenOnly) throws IOException, FcpException {
- ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() {
+ new ExtendedFcpAdapter() {
/**
* {@inheritDoc}
public void receivedPeer(FcpConnection fcpConnection, Peer peer) {
completionLatch.countDown();
}
- };
- fcpListener.execute();
+ }.execute();
}
/**
* if an FCP error occurs
*/
public void removePeer(final Peer peer) throws IOException, FcpException {
- ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() {
+ new ExtendedFcpAdapter() {
/**
* {@inheritDoc}
public void receivedPeerRemoved(FcpConnection fcpConnection, PeerRemoved peerRemoved) {
completionLatch.countDown();
}
- };
- fcpListener.execute();
+ }.execute();
}
//