Package org.openwms.common.comm.osip
Class Payload
java.lang.Object
org.openwms.common.comm.osip.Payload
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 ErrorMessage,LocationUpdateMessage,RequestMessage,ResponseMessage,SystemUpdateMessage,TimesyncRequest,TimesyncResponse,UpdateMessage
A Payload is the abstract superclass of all messages sent to subsystems like PLC or ERP.
- Author:
 - Heiko Scherrer
 - See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Datestatic final shortstatic final shortprivate Stringprivate ResponseHeaderstatic final int - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanUse all fields.static booleanChecks if the givenstrstarts with an '*'.Get the created.Get the errorCode.abstract StringSubclasses have to return an unique, case-sensitive message identifier.booleanChecks wether theerrorCodeis not null.inthashCode()Use all fields.abstract booleanDoes this type of message needs to be replied to?protected voidsetCreated(Date created) Set the created.voidsetErrorCode(String errorCode) Set the errorCode.protected voidsetHeader(ResponseHeader header) toString()Use all fields. 
- 
Field Details
- 
ERROR_CODE_LENGTH
public static final short ERROR_CODE_LENGTH- See Also:
 
 - 
DATE_LENGTH
public static final short DATE_LENGTH- See Also:
 
 - 
MESSAGE_IDENTIFIER_LENGTH
public static final int MESSAGE_IDENTIFIER_LENGTH- See Also:
 
 - 
header
 - 
errorCode
 - 
created
 
 - 
 - 
Constructor Details
- 
Payload
public Payload() 
 - 
 - 
Method Details
- 
exists
Checks if the givenstrstarts with an '*'. An optional telegram value contains '*' only.- Parameters:
 str- to check- Returns:
 - true if set
 
 - 
getHeader
 - 
setHeader
 - 
getMessageIdentifier
Subclasses have to return an unique, case-sensitive message identifier.- Returns:
 - The message TYPE field (see OSIP specification)
 
 - 
isWithoutReply
public abstract boolean isWithoutReply()Does this type of message needs to be replied to?- Returns:
 - true no reply needed, otherwise false
 
 - 
getErrorCode
Get the errorCode.- Returns:
 - the errorCode.
 
 - 
hasErrorCode
public boolean hasErrorCode()Checks wether theerrorCodeis not null.- Returns:
 - true if errorCode is set, otherwise false
 
 - 
setErrorCode
Set the errorCode.- Parameters:
 errorCode- The errorCode to set.
 - 
getCreated
Get the created.- Returns:
 - the created.
 
 - 
setCreated
Set the created.- Parameters:
 created- The created to set.
 - 
equals
Use all fields. - 
hashCode
public int hashCode()Use all fields. - 
toString
Use all fields. 
 -