SsrcTransactionNotFoundException.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.genersoft.iot.vmp.conf.exception;
  2. /**
  3. * @author lin
  4. */
  5. public class SsrcTransactionNotFoundException extends Exception{
  6. private String deviceId;
  7. private String channelId;
  8. private String callId;
  9. private String stream;
  10. public SsrcTransactionNotFoundException(String deviceId, String channelId, String callId, String stream) {
  11. this.deviceId = deviceId;
  12. this.channelId = channelId;
  13. this.callId = callId;
  14. this.stream = stream;
  15. }
  16. public String getDeviceId() {
  17. return deviceId;
  18. }
  19. public String getChannelId() {
  20. return channelId;
  21. }
  22. public String getCallId() {
  23. return callId;
  24. }
  25. public String getStream() {
  26. return stream;
  27. }
  28. @Override
  29. public String getMessage() {
  30. StringBuffer msg = new StringBuffer();
  31. msg.append(String.format("缓存事务信息未找到,device:%s channel: %s ", deviceId, channelId));
  32. if (callId != null) {
  33. msg.append(",callId: " + callId);
  34. }
  35. if (stream != null) {
  36. msg.append(",stream: " + stream);
  37. }
  38. return msg.toString();
  39. }
  40. }