-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNullNodeRemote.java
More file actions
51 lines (40 loc) · 1.09 KB
/
NullNodeRemote.java
File metadata and controls
51 lines (40 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.ashishp.dc.assignment.cl.remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import org.jetbrains.annotations.NotNull;
import com.ashishp.dc.assignment.cl.entity.Node;
import com.ashishp.dc.assignment.cl.remote.api.NodeServer;
/**
*
* @author <a href="http://www.linkedin.com/in/aashishpanchal">Aashish</a>
*
*/
public final class NullNodeRemote extends UnicastRemoteObject implements NodeServer {
/**
*
*/
private static final long serialVersionUID = 1L;
@NotNull
private final Node node;
public NullNodeRemote(@NotNull Node node) throws RemoteException {
this.node = node;
}
@NotNull
@Override
public Node getNode() throws RemoteException {
return node;
}
@Override
public void addNode(int id, @NotNull String host) throws RemoteException {
}
@Override
public void transferMoney(int recipientNodeId, int amount) throws RemoteException {
}
@Override
public boolean acceptMoney(int senderNodeId, int amount) throws RemoteException {
return false;
}
@Override
public void receiveMarker(int nodeId) throws RemoteException {
}
}