-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommunicationInterface.java
More file actions
42 lines (39 loc) · 1.12 KB
/
CommunicationInterface.java
File metadata and controls
42 lines (39 loc) · 1.12 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
import java.rmi.Remote;
import java.rmi.RemoteException;
/**
* Defines what methods are accessible over RMI
*/
public interface CommunicationInterface extends Remote {
/**
* Get the id string of the object
*/
String getID() throws RemoteException;
/**
* Create a public key to otherPub spec
*/
void createPub(byte[] otherPub, CommunicationInterface other) throws RemoteException;
/**
* Share the created public key and params with other party
*/
void share(byte[] otherPub, byte[] otherParams) throws RemoteException;
/**
* Share encoder params to create decoder
*/
void createDecoder(byte[] params) throws RemoteException;
/**
* Send a message to the object
*/
void message(byte[] msg, byte[] checksum) throws RemoteException;
/**
* Get flags from Security class of other Messenger
*/
Boolean[] getFlags() throws RemoteException;
/**
* Initialize communication with the object
*/
void init(String other) throws RemoteException;
/**
* Disconnect from all connections
*/
void disconnect() throws RemoteException;
}