@Test public void testParseRecvOnly() throws SdpException { String sdp1 = "a=recvonly\n\r"; AbstractConnectionModeAttribute obj = parser.parse(sdp1); Assert.assertEquals(ConnectionModeAttribute.RECVONLY, obj.getKey()); Assert.assertEquals("recvonly", obj.getKey()); }
@Override public ConnectionModeAttribute parse(String sdp) throws SdpException { try { String mode = sdp.trim().substring(2); if (!isTypeValid(mode)) { throw new IllegalArgumentException("Unknown connection mode"); } return new ConnectionModeAttribute(mode); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }
ConnectionModeAttributeParser implements SdpParser<ConnectionModeAttribute> { @Override public ConnectionModeAttribute parse(String sdp) throws SdpException { try { String mode = sdp.trim().substring(2); if (!isTypeValid(mode)) { throw new IllegalArgumentException("Unknown connection mode"); } return new ConnectionModeAttribute(mode); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } } }
ConnectionModeAttributeParser implements SdpParser<ConnectionModeAttribute> { @Override public ConnectionModeAttribute parse(String sdp) throws SdpException { try { String mode = sdp.trim().substring(2); if (!isTypeValid(mode)) { throw new IllegalArgumentException("Unknown connection mode"); } return new ConnectionModeAttribute(mode); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  }
ConnectionModeAttributeParser implements SdpParser<ConnectionModeAttribute> { @Override public ConnectionModeAttribute parse(String sdp) throws SdpException { try { String mode = sdp.trim().substring(2); if (!isTypeValid(mode)) { throw new IllegalArgumentException("Unknown connection mode"); } return new ConnectionModeAttribute(mode); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  @Override boolean canParse(String sdp); @Override ConnectionModeAttribute parse(String sdp); @Override void parse(ConnectionModeAttribute field, String sdp); }
ConnectionModeAttributeParser implements SdpParser<ConnectionModeAttribute> { @Override public ConnectionModeAttribute parse(String sdp) throws SdpException { try { String mode = sdp.trim().substring(2); if (!isTypeValid(mode)) { throw new IllegalArgumentException("Unknown connection mode"); } return new ConnectionModeAttribute(mode); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  @Override boolean canParse(String sdp); @Override ConnectionModeAttribute parse(String sdp); @Override void parse(ConnectionModeAttribute field, String sdp);  }