IPlatformService.java 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package com.genersoft.iot.vmp.service;
  2. import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
  3. import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
  4. import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
  5. import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
  6. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  7. import com.genersoft.iot.vmp.service.bean.InviteTimeOutCallback;
  8. import com.github.pagehelper.PageInfo;
  9. import javax.sip.InvalidArgumentException;
  10. import javax.sip.SipException;
  11. import java.text.ParseException;
  12. /**
  13. * 国标平台的业务类
  14. * @author lin
  15. */
  16. public interface IPlatformService {
  17. ParentPlatform queryPlatformByServerGBId(String platformGbId);
  18. /**
  19. * 分页获取上级平台
  20. * @param page
  21. * @param count
  22. * @return
  23. */
  24. PageInfo<ParentPlatform> queryParentPlatformList(int page, int count);
  25. /**
  26. * 添加级联平台
  27. * @param parentPlatform 级联平台
  28. */
  29. boolean add(ParentPlatform parentPlatform);
  30. /**
  31. * 平台上线
  32. * @param parentPlatform 平台信息
  33. */
  34. void online(ParentPlatform parentPlatform);
  35. /**
  36. * 平台离线
  37. * @param parentPlatform 平台信息
  38. */
  39. void offline(ParentPlatform parentPlatform, boolean stopRegisterTask);
  40. /**
  41. * 向上级平台发起注册
  42. * @param parentPlatform
  43. */
  44. void login(ParentPlatform parentPlatform);
  45. /**
  46. * 向上级平台发送位置订阅
  47. * @param platformId 平台
  48. */
  49. void sendNotifyMobilePosition(String platformId);
  50. /**
  51. * 向上级发送语音喊话的消息
  52. * @param platform 平台
  53. * @param channelId 通道
  54. * @param hookEvent hook事件
  55. * @param errorEvent 信令错误事件
  56. * @param timeoutCallback 超时事件
  57. */
  58. void broadcastInvite(ParentPlatform platform, String channelId, MediaServerItem mediaServerItem, ZlmHttpHookSubscribe.Event hookEvent,
  59. SipSubscribe.Event errorEvent, InviteTimeOutCallback timeoutCallback) throws InvalidArgumentException, ParseException, SipException;
  60. /**
  61. * 语音喊话回复BYE
  62. * @param platform 平台
  63. * @param channelId 通道
  64. * @param stream 流信息
  65. */
  66. void stopBroadcast(ParentPlatform platform, String channelId, String stream )throws InvalidArgumentException, ParseException, SsrcTransactionNotFoundException, SipException;
  67. }