M
marcpirat
hi
in a abstract class, i created a object.... i ha problem to access
it...
code:
public class Passerelle{
static List lstIpServeur;
static List lstIpClient;
static List lstPort;
public static void main(String[] args) throws IOException {
ServeurPasserelle serveurpasserelle = new ServeurPasserelle();
serveurpasserelle.start();
}
}
another class
code:
abstract public class Protocol {
public Passerelle passerelle;
public Protocol(){
passerelle = new Passerelle();
}
abstract public String processInput(String theInput, Socket
socket);
}
in another class (ServeurPasserelleThread )i do
code:
ProtocolPasserelleServeur protocol = new ProtocolPasserelleServeur();
protocol.processInput("test");
and the last class
code:
public class ProtocolPasserelleServeur extends Protocol{
private final int WAITING = 0;
private final int SENT = 1;
private int state = WAITING;
public String processInput(String theInput, Socket socket) {
lstIpServeur.add(socket.getInetAddress());
}
return theOutput;
}
}
java don't seem to like that
i'm not able to have access to Passerelle list...
any idea
in a abstract class, i created a object.... i ha problem to access
it...
code:
public class Passerelle{
static List lstIpServeur;
static List lstIpClient;
static List lstPort;
public static void main(String[] args) throws IOException {
ServeurPasserelle serveurpasserelle = new ServeurPasserelle();
serveurpasserelle.start();
}
}
another class
code:
abstract public class Protocol {
public Passerelle passerelle;
public Protocol(){
passerelle = new Passerelle();
}
abstract public String processInput(String theInput, Socket
socket);
}
in another class (ServeurPasserelleThread )i do
code:
ProtocolPasserelleServeur protocol = new ProtocolPasserelleServeur();
protocol.processInput("test");
and the last class
code:
public class ProtocolPasserelleServeur extends Protocol{
private final int WAITING = 0;
private final int SENT = 1;
private int state = WAITING;
public String processInput(String theInput, Socket socket) {
lstIpServeur.add(socket.getInetAddress());
}
return theOutput;
}
}
java don't seem to like that
i'm not able to have access to Passerelle list...
any idea