Package com.bea.wcp.diameter
Class GenericMessageFactory
java.lang.Object
com.bea.wcp.diameter.GenericMessageFactory
- All Implemented Interfaces:
MessageFactory
Generic message factory. Base class for custom message factory
implementations.
- Author:
- Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAnswer(Request req, ResultCode rc) createAnswer(ByteBuffer bb, com.bea.wcp.diameter.transport.Connection c) createRequest(Node node, Command cmd, int appId, String sessionId) Creates a new Message with the specified command.createRequest(ByteBuffer bb, com.bea.wcp.diameter.transport.Connection c) Decodes Diameter message from a byte buffer.
-
Constructor Details
-
GenericMessageFactory
public GenericMessageFactory()
-
-
Method Details
-
createRequest
Description copied from interface:MessageFactoryDecodes Diameter message from a byte buffer. This method should be sure to return Message objects of type Request if the message is a request, otherwise it should return objects of type Answer.- Specified by:
createRequestin interfaceMessageFactory- Parameters:
bb- the bytes to be decodedc- the connection from which the message was received- Returns:
- the Message decoded from the specified bytes
-
createAnswer
- Specified by:
createAnswerin interfaceMessageFactory
-
createRequest
Description copied from interface:MessageFactoryCreates a new Message with the specified command. By implementing this method, custom factories can be used to create more specified Message object types.- Specified by:
createRequestin interfaceMessageFactorycmd- the command for the message- Returns:
- the resulting Message object
-
createAnswer
- Specified by:
createAnswerin interfaceMessageFactory
-