public interface MessageFactory
Provides the ability to create messages that can be assigned to message variables. The message can be created as a raw message or normalized message. The following creates a raw message:
msg = msgFactory.create();
The message that is created has no content-type associated with it and must be set separately. To create a raw message with a content-type you can do the following:
msg = msgFactory.create("application/json");
To create a normalized message:
msg = msgFactory.createNormalized();
Modifier and Type | Method and Description |
---|---|
Message |
create()
Creates a message.
|
Message |
create(java.lang.String contentType)
Creates a message.
|
Message |
createNormalized()
Creates a normalized message.
|
Message create()
Message
.Message create(java.lang.String contentType)
contentType
- Content-Type of the message to create.Message
.?? 2022 Perforce Software, All rights reserved
This software is the confidential and proprietary information of Perforce, Inc. and is subject to copyright protection under laws of the United States of America and other countries. The use of this software should be in accordance with the license agreement terms you entered into with Perforce, Inc.