@Test(expected = IllegalStateException.class) public void testNeitherBufferIdNorPayloadSet3() { OFPacketOut packetOut = new OFPacketOut(); packetOut.validate(); }
public void validate() { if (!((bufferId != BUFFER_ID_NONE) ^ (packetData != null && packetData.length > 0))) { throw new IllegalStateException( "OFPacketOut must have exactly one of (bufferId, packetData) set (not one, not both)"); } }
OFPacketOut extends OFMessage implements OFActionFactoryAware { public void validate() { if (!((bufferId != BUFFER_ID_NONE) ^ (packetData != null && packetData.length > 0))) { throw new IllegalStateException( "OFPacketOut must have exactly one of (bufferId, packetData) set (not one, not both)"); } } }
OFPacketOut extends OFMessage implements OFActionFactoryAware { public void validate() { if (!((bufferId != BUFFER_ID_NONE) ^ (packetData != null && packetData.length > 0))) { throw new IllegalStateException( "OFPacketOut must have exactly one of (bufferId, packetData) set (not one, not both)"); } } OFPacketOut(); }
OFPacketOut extends OFMessage implements OFActionFactoryAware { public void validate() { if (!((bufferId != BUFFER_ID_NONE) ^ (packetData != null && packetData.length > 0))) { throw new IllegalStateException( "OFPacketOut must have exactly one of (bufferId, packetData) set (not one, not both)"); } } OFPacketOut(); int getBufferId(); OFPacketOut setBufferId(int bufferId); byte[] getPacketData(); OFPacketOut setPacketData(byte[] packetData); short getInPort(); OFPacketOut setInPort(short inPort); OFPacketOut setInPort(OFPort inPort); short getActionsLength(); int getActionsLengthU(); OFPacketOut setActionsLength(short actionsLength); List<OFAction> getActions(); OFPacketOut setActions(List<OFAction> actions); @Override void setActionFactory(OFActionFactory actionFactory); @Override void readFrom(ChannelBuffer data); @Override void writeTo(ChannelBuffer data); void validate(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
OFPacketOut extends OFMessage implements OFActionFactoryAware { public void validate() { if (!((bufferId != BUFFER_ID_NONE) ^ (packetData != null && packetData.length > 0))) { throw new IllegalStateException( "OFPacketOut must have exactly one of (bufferId, packetData) set (not one, not both)"); } } OFPacketOut(); int getBufferId(); OFPacketOut setBufferId(int bufferId); byte[] getPacketData(); OFPacketOut setPacketData(byte[] packetData); short getInPort(); OFPacketOut setInPort(short inPort); OFPacketOut setInPort(OFPort inPort); short getActionsLength(); int getActionsLengthU(); OFPacketOut setActionsLength(short actionsLength); List<OFAction> getActions(); OFPacketOut setActions(List<OFAction> actions); @Override void setActionFactory(OFActionFactory actionFactory); @Override void readFrom(ChannelBuffer data); @Override void writeTo(ChannelBuffer data); void validate(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static int MINIMUM_LENGTH; static int BUFFER_ID_NONE; }