Changed visibility of some methods.

This commit is contained in:
senft-desktop 2012-11-29 18:23:43 +01:00
parent 384c14b359
commit e6e8b234eb

View File

@ -178,7 +178,7 @@ public class Node {
sendBroadcast(packet_id, command, data);
}
void sendBroadcast(int packet_id, byte command, byte[] data) {
protected void sendBroadcast(int packet_id, byte command, byte[] data) {
ByteBuffer buffer = ByteBuffer.allocate(BUF_SIZE);
buffer.put(MessageType.BROADCAST);
@ -215,19 +215,19 @@ public class Node {
}
boolean hasAck(int ack_id) {
protected boolean hasAck(int ack_id) {
return acks.containsKey(ack_id);
}
Ack getAck(int ack_id) {
protected Ack getAck(int ack_id) {
return acks.get(ack_id);
}
Ack removeAck(int ack_id) {
protected Ack removeAck(int ack_id) {
return acks.remove(ack_id);
}
boolean addNeighbor(SocketAddress node) {
protected boolean addNeighbor(SocketAddress node) {
if (!hasNeighbor(node)) {
neighbors.add(node);
return true;
@ -242,7 +242,7 @@ public class Node {
* address to remove
* @return True if an address was removed, else false
*/
boolean removeNeighbor(SocketAddress node) {
protected boolean removeNeighbor(SocketAddress node) {
SocketAddress removed = null;
int idToRemove = getNeighborId(node);
if (idToRemove != -1) {