invoked method break

hi

how to break this invoked method's action from other threads ?

Method met = servlet.getClass().getMethod(mname,

new Class[]{ this.getClass()});

met.invoke(servlet,new Object[]{this});

Like Other thread's content:

met.break();

Notes:

i cant change invoked method's source code.

[546 byte] By [myururdurmaza] at [2007-11-27 6:01:16]
# 1
What do you mean by "break"? What are you trying to do?
georgemca at 2007-7-12 16:40:50 > top of Java-index,Core,Core APIs...
# 2
im trying break an invoked method. like a thread.
myururdurmaza at 2007-7-12 16:40:50 > top of Java-index,Core,Core APIs...
# 3

> im trying break an invoked method. like a thread.

You mean stop it being executed? You can't, unless you kill the thread it's running in (note that all code is running in a thread, whether you consciously create that thread or not) or the method was designed such that you can tell it to stop, by setting a flag or something. What are you trying to achieve? I mean, why do you want to force a method to return early?

georgemca at 2007-7-12 16:40:50 > top of Java-index,Core,Core APIs...
# 4
i have a bad designed code (very large). and i don't want rewrite. i will try invoked section to thread. thanks
myururdurmaza at 2007-7-12 16:40:50 > top of Java-index,Core,Core APIs...
# 5
> i have a bad designed code (very large). and i don't> want rewrite. i will try invoked section to thread.> thanksOk good luck with that.....
georgemca at 2007-7-12 16:40:50 > top of Java-index,Core,Core APIs...