Package org.serviceconnector.scmp
Class SCMPCompositeReceiver
java.lang.Object
org.serviceconnector.scmp.SCMPMessage
org.serviceconnector.scmp.SCMPCompositeReceiver
- All Implemented Interfaces:
Serializable
The Class SCMPCompositeReceiver. Used to handle incoming large request/response. Stores parts and put them together to complete request/response.
- Author:
- JTraber
- See Also:
-
Field Summary
Fields inherited from class org.serviceconnector.scmp.SCMPMessage
header, SC_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionSCMPCompositeReceiver(SCMPMessage request, SCMPMessage messagePart) Instantiates a new SCMPCompositeReceiver. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SCMPMessage message) Adds the part.voidcomplete()Complete.getBody()Gets the body.intGets the body length.Gets the whole header.Gets the message type.intGets the offset.Gets the poll message.voidIncomplete.booleanbooleanChecks if the message is a composite.voidwriteBodyAsStream(OutputStream outStream) Write body out to given stream instance.Methods inherited from class org.serviceconnector.scmp.SCMPMessage
getBodyOffset, getBodyType, getCacheId, getHeader, getHeader, getHeaderBoolean, getHeaderFlag, getHeaderInt, getHttpUrlFileQualifier, getMessageSequenceNr, getPartSize, getSCMPVersion, getServiceName, getSessionId, isBodyOffset, isByteArray, isCached, isCompressed, isFault, isKeepAlive, isLargeMessage, isPart, isPollRequest, isReply, isReqCompleteAfterMarshallingPart, isString, removeHeader, removeHeader, setBody, setBody, setCached, setCacheId, setHeader, setHeader, setHeader, setHeader, setHeader, setHeader, setHeader, setHeader, setHeaderCheckNull, setHeaderFlag, setHttpUrlFileQualifier, setIsReply, setIsReqCompleteAfterMarshallingPart, setMessageType, setMessageType, setPartSize, setServiceName, setSessionId, toString
-
Constructor Details
-
SCMPCompositeReceiver
Instantiates a new SCMPCompositeReceiver.- Parameters:
request- the request messagemessagePart- the message part
-
-
Method Details
-
getHeader
Gets the whole header.- Overrides:
getHeaderin classSCMPMessage- Returns:
- the whole header
-
add
Adds the part.- Parameters:
message- the SCMP message
-
isComposite
public boolean isComposite()Checks if the message is a composite.- Overrides:
isCompositein classSCMPMessage- Returns:
- true, if is composite
-
getBodyLength
public int getBodyLength()Gets the body length.- Overrides:
getBodyLengthin classSCMPMessage- Returns:
- the body length
-
getBody
Gets the body.- Overrides:
getBodyin classSCMPMessage- Returns:
- the body
-
writeBodyAsStream
Write body out to given stream instance.- Parameters:
outStream- the out stream
-
getMessageType
Gets the message type.- Overrides:
getMessageTypein classSCMPMessage- Returns:
- the message type
-
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.
-