SsrcTransactionNotFoundException.java 1.2 KB

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