1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
PcapPacketHandler<String> jpacketHandler;
jpacketHandler = new PcapPacketHandler<String>() {
GestionPacketDAO g1;
int row=0;
public void nextPacket(PcapPacket packet, String user) {
row++;
String s = packet.toHexdump();
try {
g1 = new GestionPacketDAO();
g1.Insert(s, row);//fonction qui fait l'insertion
}
catch (InvalidRequestException exg) {Logger.getLogger(AccueilInsertion.class.getName()).log(Level.SEVERE, null, exg); }
catch (TException exg) {
Logger.getLogger(AccueilInsertion.class.getName()).log(Level.SEVERE, null, exg);
}
}} |
Partager