Class SCMPCompositeReceiver

java.lang.Object
org.serviceconnector.scmp.SCMPMessage
org.serviceconnector.scmp.SCMPCompositeReceiver
All Implemented Interfaces:
Serializable

public class SCMPCompositeReceiver extends SCMPMessage
The Class SCMPCompositeReceiver. Used to handle incoming large request/response. Stores parts and put them together to complete request/response.
Author:
JTraber
See Also:
  • Constructor Details

    • SCMPCompositeReceiver

      public SCMPCompositeReceiver(SCMPMessage request, SCMPMessage messagePart)
      Instantiates a new SCMPCompositeReceiver.
      Parameters:
      request - the request message
      messagePart - the message part
  • Method Details

    • getHeader

      public Map<String,String> getHeader()
      Gets the whole header.
      Overrides:
      getHeader in class SCMPMessage
      Returns:
      the whole header
    • add

      public void add(SCMPMessage message)
      Adds the part.
      Parameters:
      message - the SCMP message
    • isComposite

      public boolean isComposite()
      Checks if the message is a composite.
      Overrides:
      isComposite in class SCMPMessage
      Returns:
      true, if is composite
    • getBodyLength

      public int getBodyLength()
      Gets the body length.
      Overrides:
      getBodyLength in class SCMPMessage
      Returns:
      the body length
    • getBody

      public Object getBody()
      Gets the body.
      Overrides:
      getBody in class SCMPMessage
      Returns:
      the body
    • writeBodyAsStream

      public void writeBodyAsStream(OutputStream outStream)
      Write body out to given stream instance.
      Parameters:
      outStream - the out stream
    • getMessageType

      public String getMessageType()
      Gets the message type.
      Overrides:
      getMessageType in class SCMPMessage
      Returns:
      the message type
    • getPollMessage

      public SCMPMessage getPollMessage()
      Gets the poll message. Poll message to send in order to receive the next part of large message.
      Returns:
      the poll message
    • getOffset

      public int getOffset()
      Gets the offset.
      Returns:
      the offset
    • isComplete

      public boolean isComplete()
      Returns:
      the complete
    • incomplete

      public void incomplete()
      Incomplete.
    • complete

      public void complete()
      Complete.