Class TyrusFrame

    • Constructor Detail

      • TyrusFrame

        protected TyrusFrame​(Frame frame,
                             TyrusFrame.FrameType frameType)
        Constructor.
        Parameters:
        frame - enriched frame.
        frameType - type of the frame.
    • Method Detail

      • respond

        public abstract void respond​(TyrusWebSocket socket)
        Execution part of frame processing.
        Parameters:
        socket - socket on which the appropriate action will be performed.
      • getFrameType

        public TyrusFrame.FrameType getFrameType()
        Returns the type of the frame. It is used for distinguishing frame types in monitoring.

        TODO: consider moving this to "MonitoredFrame" or something like this;

        Returns:
        type of the frame.
      • wrap

        public static TyrusFrame wrap​(Frame frame,
                                      byte inFragmentedType,
                                      java.nio.ByteBuffer remainder)
        TyrusFrame factory method.
        Parameters:
        frame - original plain frame.
        inFragmentedType - type of fragment (text or binary).
        remainder - decoding remainder. Used only for partial text frames.
        Returns:
        new TyrusFrame.