M
Magne Bergfjord
Hi!
I have an http module which I intend to use in my application:
To connect to a server and send a request, there is a method like this in
the module:
public void sendRequest(String query){
....
}
When the server responds, it calls another method in the same class:
public void respons(String results){
....
}
I want to combine these two methods so that my application can use one
method looking something like this:
public String sendRequest(String xml){
....
}
which returns the results when the server calls the respons method. Is
this possible?
To summarize, the problem is to make one method return something when
another method is called. I guess there are some smart ways around this
problem, but I haven't found any yet. I hope there is some way to solve
this without changing the underlaying logic of the http module too much.
Magne Bergfjord
I have an http module which I intend to use in my application:
To connect to a server and send a request, there is a method like this in
the module:
public void sendRequest(String query){
....
}
When the server responds, it calls another method in the same class:
public void respons(String results){
....
}
I want to combine these two methods so that my application can use one
method looking something like this:
public String sendRequest(String xml){
....
}
which returns the results when the server calls the respons method. Is
this possible?
To summarize, the problem is to make one method return something when
another method is called. I guess there are some smart ways around this
problem, but I haven't found any yet. I hope there is some way to solve
this without changing the underlaying logic of the http module too much.
Magne Bergfjord