import java.util.Arrays;
-import org.opendaylight.openflowjava.protocol.impl.util.ByteBufUtils;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* @author michal.polkorab
*/
public class WaitForMessageEvent implements ClientEvent {
-
+
private static final Logger LOGGER = LoggerFactory.getLogger(WaitForMessageEvent.class);
private byte[] headerExpected;
private byte[] headerReceived;
* @param headerExpected header (first 8 bytes) of expected message
*/
public WaitForMessageEvent(byte[] headerExpected) {
- this.headerExpected = headerExpected;
+ this.headerExpected = new byte[headerExpected.length];
+ for (int i = 0; i < headerExpected.length; i++) {
+ this.headerExpected[i] = headerExpected[i];
+ }
}
@Override
* @param headerReceived header (first 8 bytes) of expected message
*/
public void setHeaderReceived(byte[] headerReceived) {
- this.headerReceived = headerReceived;
+ this.headerReceived = new byte[headerReceived.length];
+ for (int i = 0; i < headerReceived.length; i++) {
+ this.headerReceived[i] = headerReceived[i];
+ }
}
-
-
}