Class ReactorSocket

  • All Implemented Interfaces:
    tv.mycujoo.mclsnetwork.network.socket.IReactorSocket

    
    public final class ReactorSocket
     implements IReactorSocket
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit addListener(ReactorCallback reactorCallback) Adds a listener to event updates.
      Unit joinEvent(String eventId) Joins to an Event with eventId by sending JOIN command.
      Unit leave(Boolean destroyAfter) Leaves a connection by sending LEAVE command.
      Unit joinTimeline(JoinTimelineParam param) Join a timeline to listen to timeline changes before doing so, a connection must be active
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addListener

         Unit addListener(ReactorCallback reactorCallback)

        Adds a listener to event updates. Those changes are only triggered after an event is joined via joinEvent

        Parameters:
        reactorCallback - a callback interface used to inform the user about event/annotation actions timeline updates
      • joinEvent

         Unit joinEvent(String eventId)

        Joins to an Event with eventId by sending JOIN command. before doing so, it checks if active connection is already established, if so it will terminate that. Also, it checks if a socket client has been created, if not, it will create one.

      • leave

         Unit leave(Boolean destroyAfter)

        Leaves a connection by sending LEAVE command. eventId from formerly used join command will be used

        Parameters:
        destroyAfter - will decide if socket should be terminated after leaving.
      • joinTimeline

         Unit joinTimeline(JoinTimelineParam param)

        Join a timeline to listen to timeline changes before doing so, a connection must be active

        Parameters:
        param - provides timelineId & lastActionId (optional)