IPlatformService.java 2.5 KB

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