Java 类org.projectfloodlight.openflow.protocol.OFRoleRequestFailedCode 实例源码

项目:fresco_floodlight    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:iTAP-controller    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:SDN-Multicast    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:arscheduler    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:floodlight1.2-delay    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:floodlight-hardware    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:ACAMPController    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    eventLoop.runTasks();
    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:fast-failover-demo    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:floodlightLB    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:DSC    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:floodlight    文件:OFConnectionTest.java   
/** write a request which triggers an OFErrorMsg response */
@Test(timeout = 5000)
public void testWriteRequestOFErrorMsg() throws InterruptedException, ExecutionException {
    Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();

    OFRoleRequest roleRequest = factory.buildRoleRequest().setRole(OFControllerRole.ROLE_MASTER).build();
    ListenableFuture<OFRoleReply> future = conn.writeRequest(roleRequest);
    assertThat("Connection should have 1 pending request",
            conn.getPendingRequestIds().size(), equalTo(1));

    assertThat("Should have captured MsgList", cMsgList.getValue(),
            Matchers.<OFMessage> contains(roleRequest));

    assertThat("Future should not be complete yet", future.isDone(), equalTo(false));
    OFRoleRequestFailedErrorMsg roleError = factory.errorMsgs().buildRoleRequestFailedErrorMsg()
        .setXid(roleRequest.getXid())
        .setCode(OFRoleRequestFailedCode.STALE)
        .build();

    assertThat("Connection should have accepted the response",
            conn.deliverResponse(roleError),
            equalTo(true));

    OFErrorMsgException e =
            FutureTestUtils.assertFutureFailedWithException(future,
                    OFErrorMsgException.class);
    assertThat(e.getErrorMessage(), CoreMatchers.<OFErrorMsg>equalTo(roleError));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static OFRoleRequestFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.2: " + val);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.2: " + e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static OFRoleRequestFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.3: " + val);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.3: " + e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static OFRoleRequestFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.4: " + val);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.4: " + e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static OFRoleRequestFailedCode readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.2: " + val);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.2: " + e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static OFRoleRequestFailedCode readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.3: " + val);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.3: " + e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer15.java   
public static OFRoleRequestFailedCode readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer15.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.5: " + val);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer15.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.5: " + e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static OFRoleRequestFailedCode readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static OFRoleRequestFailedCode ofWireValue(short val) {
    switch(val) {
        case STALE_VAL:
            return OFRoleRequestFailedCode.STALE;
        case UNSUP_VAL:
            return OFRoleRequestFailedCode.UNSUP;
        case BAD_ROLE_VAL:
            return OFRoleRequestFailedCode.BAD_ROLE;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFRoleRequestFailedCode in version 1.4: " + val);
    }
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static short toWireValue(OFRoleRequestFailedCode e) {
    switch(e) {
        case STALE:
            return STALE_VAL;
        case UNSUP:
            return UNSUP_VAL;
        case BAD_ROLE:
            return BAD_ROLE_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFRoleRequestFailedCode in version 1.4: " + e);
    }
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static void writeTo(ChannelBuffer bb, OFRoleRequestFailedCode e) {
    bb.writeShort(toWireValue(e));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static void putTo(OFRoleRequestFailedCode e, PrimitiveSink sink) {
    sink.putShort(toWireValue(e));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static void writeTo(ChannelBuffer bb, OFRoleRequestFailedCode e) {
    bb.writeShort(toWireValue(e));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer13.java   
public static void putTo(OFRoleRequestFailedCode e, PrimitiveSink sink) {
    sink.putShort(toWireValue(e));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static void writeTo(ChannelBuffer bb, OFRoleRequestFailedCode e) {
    bb.writeShort(toWireValue(e));
}
项目:openflowj-otn    文件:OFRoleRequestFailedCodeSerializerVer14.java   
public static void putTo(OFRoleRequestFailedCode e, PrimitiveSink sink) {
    sink.putShort(toWireValue(e));
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static void writeTo(ByteBuf bb, OFRoleRequestFailedCode e) {
    bb.writeShort(toWireValue(e));
}
项目:loxigen-artifacts    文件:OFRoleRequestFailedCodeSerializerVer12.java   
public static void putTo(OFRoleRequestFailedCode e, PrimitiveSink sink) {
    sink.putShort(toWireValue(e));
}