public class DefaultSingleHttpMessageContainer extends AbstractHttpMessageContainer implements SingleHttpMessageContainer
SingleHttpMessageContainer
.SingleHttpMessageContainer
,
DefaultSingleHistoryReferenceContainer
Constructor and Description |
---|
DefaultSingleHttpMessageContainer(String name,
Component component)
Constructs a
DefaultSingleHttpMessageContainer with no contained HttpMessage
and with the given container name and component . |
DefaultSingleHttpMessageContainer(String name,
Component component,
HttpMessage httpMessage)
Constructs a
DefaultSingleHttpMessageContainer with the given container name
and component and contained httpMessage . |
Modifier and Type | Method and Description |
---|---|
HttpMessage |
getMessage()
Returns the contained message.
|
boolean |
isEmpty()
Tells whether or not the message container is empty, that is, doesn't contain any message.
|
getMessageClass
getComponent, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponent, getMessageClass, getName
public DefaultSingleHttpMessageContainer(String name, Component component)
DefaultSingleHttpMessageContainer
with no contained HttpMessage
and with the given container name
and component
.name
- the name of the containercomponent
- the GUI component of the containerIllegalArgumentException
- if the given name
or component
is null
.public DefaultSingleHttpMessageContainer(String name, Component component, HttpMessage httpMessage)
DefaultSingleHttpMessageContainer
with the given container name
and component
and contained httpMessage
.name
- the name of the containercomponent
- the GUI component of the containerhttpMessage
- the contained HTTP message, null
if noneIllegalArgumentException
- if the given name
or component
is null
.public boolean isEmpty()
MessageContainer
isEmpty
in interface MessageContainer<HttpMessage>
true
if the container is empty, false
otherwise.public HttpMessage getMessage()
SingleMessageContainer
null
if no message is present or an error
occurred while getting the message (for example, failed to read a persisted message).getMessage
in interface SingleMessageContainer<HttpMessage>
null
if not present or an error occurred while
getting the message.