} else if (provider.isPacketIn(in.toArray())) {
System.out.println("[OF-INFO] DPID: " + Long.toHexString(swRef.getDpid().longValue()) +" Packet-In is received from the Switch");
ofSessionHandler.tell(new OFEventPacketIn(swRef, provider.parsePacketIn(in.toArray())), getSelf());
} else if (provider.isError(in.toArray())) {
System.out.println("[OF-INFO] DPID: " + Long.toHexString(swRef.getDpid().longValue()) + " Error is received from the Switch ");
ofSessionHandler.tell(new OFEventError(swRef, provider.parseError(in.toArray())), getSelf());
} else if (provider.isEchoRequest(in.toArray())) {
System.out.println("[OF-INFO] DPID: " + Long.toHexString(swRef.getDpid().longValue()) + " Echo request is received from the Switch ");
getSender().tell(TcpMessage.write(ByteString.fromArray(provider.encodeEchoReply())), getSelf());
}
//ofSessionHandler.tell(new OFEventIncoming(swRef), getSelf());