Hi, I'm new to
Java and still getting my feet wet. Looking at old topics and the articles/FAQs here have helped, so thank you! If something I write here doesn't make sense I probably got my wires crossed somewhere, so please let me know

.
I've been searching around this morning for ways to modify a method at runtime. It seems like there are a lot of different techniques for this over the last 10 or so years so I'd like to know what's considered old hat and what is current practice.
Here's why I want to do this. I'm writing a telnet library for a game I'm working on (a text mud). The server has a method that sends output from the mud to the client (call it
send). Simplified it might look like this:
There are options that could change how the server sends data to the client. One example is the option MCCP (mud client compression protocol). When MCCP turns on, the server starts compressing all output sent. What I'd like to do is change the method to something like:
Now I guess I could include all the possible modifications in the send method, and check if they're active at runtime. But what would be some more dynamic ways to change things around, so I wouldn't have to put it in the send method beforehand?