The ExCon receiver is a prepackaged class that you simply have to create an instance of, optionally register some commands of your own, and send it the "go" message.
Create an instance of Receiver by sending it the port number that it will listen on.
final Receiver rcvr = new Receiver(2526);
You can also create a new Receiver without the port number. But you must set the port separately before starting the receiver.
final Receiver rcvr = new Receiver();
rcvr.setPort(2526);
At this point you need to register all commands with receiver. It is only listening otherwise with no knowledge of how to do anything. Minimally you might want to register all of the default commands. It doesn't matter what order you register them, the menu will be presented in alphabetic order.
final Receiver rcvr = new Receiver(2526);
rcvr.registerStandard();
/*
* Register any other commands before the go
*/
rcvr.go();
We also added the "go" message in the previous example. This must be issued after all commands are registered. Receiver will then start listening to the specified port for the Sender that will be requesting commands that need to be run.