Hi,
I am trying to connect a device through a port. while making an attempt, i am going for the following commands
synchronized(this)
{
this.wait(10000)
}
.
.
.
if (!xyz.isConnected())
{
String error = "Connection error: Unable to connect host";
xyz.displayErrorOnTerminal(error);
}
the problem is the connection is not made within this given time. so it displays an error msg. but after some 30 sec, the connection is established. from this i came to understand that some thread is running behind, it completes the job.
for this i cann't change the wait time, its as per design.
so can any one give me a solution, so that the msg should not print until the thread stops.ie...it should not come for if statement untill the thread completes its job.
Thanks...
Babu Shanmugham