//code:
---------------------------------------------------------------------------
static class riu_voicecall_thread extends Thread{
int column ;
riu_voicecall_thread(int column){
this.column = column;
}
void operator_call_0(int column){
int col = column;
num = null;
switch(col){
case 0: ....instructions
break;
}
String originate = "command";// some command
if(num != null){
if(tcp1.out != null)
tcp1.out.println(originate);
System.out.println(originate);}else{
JOptionPane.showMessageDialog(null,"RT Phoner Not Available");
}
}
void operator_call_1(int column){
int col = column;
num = null;
switch(col){
case 1: ....instructions
break;
}
String originate ="command";// some instructions
if(num != null){
if(tcp1.out != null)
tcp1.out.println(originate);
System.out.println(originate);}else{
JOptionPane.showMessageDialog(null,"RT Phoner Not Available");
}
}
void operator_call_2(int column){
int col = column;
num = null;
switch(col){
case 2:....instructions
break;
}
String originate = "command";//some instructions
if(num != null){
if(tcp1.out != null)
tcp1.out.println(originate);
System.out.println(originate);}else{
JOptionPane.showMessageDialog(null,"RT Phoner Not Available");
}
}
void operator_call_3(int column){
int col = column;
num = null;
switch(col){
case 3: ....instructions
break;
}
String originate = "command";//some instructions
if(num != null){
if(tcp1.out != null)
tcp1.out.println(originate);
System.out.println(originate);}else{
JOptionPane.showMessageDialog(null,"RT Phoner Not Available");
}
}
public void run() {
System.out.println("operator_call column"+ column);
if(column == 0)operator_call_0(0);
else if(column == 1)operator_call_1(1);
else if(column == 2)operator_call_2(2);
else if(column == 3)operator_call_3(3);
}
}
---------------------------------------------------------------------------
query:- POSTED IN ref. to previous query.
Now please tell how much reliable is this thread.
if called frequently,from function.
Actually is wanted to know since the four objects of threads are made.
but since the thread is static ,
do there are chances of variable column getting changed.
Since now i have hard coded.
regards Sachindra.