transmit a java.lang.reflect.Proxy over a network

Posted by panzi on Stack Overflow See other posts from Stack Overflow or by panzi
Published on 2010-05-06T21:35:16Z Indexed on 2010/05/06 21:38 UTC
Read the original article Hit count: 228

Filed under:
|
|
|
|

Is there a convenient way to transmit an object including its code (the class) over a network (not just the instance data)?

Don't ask me why I want to do this. It's in an assignment. I asked several times if that is really what they meant and the didn't rephrase their answer so I guess they really want us to transmit code (not just the field data) over a network. To be honest I have no clue why we need a Proxy in this assignment anyway, just writing a simple class would do IMO. The assignment says that we should instantiate the proxy on the server and transmit it to the client (and yes, they talk about a java.lang.reflect.Proxy, they name this class). Because there is no class file for a proxy I can't deploy that. I guess I would have to somehow read out the bytecode of the generated Proxy, transmit it to the client and then load it. Which makes absolutely no sense at all, but this seems what they want us to do. I don't get why.

© Stack Overflow or respective owner

Related posts about java

Related posts about proxy