org.jdiameter.api
Interface RawSession

All Superinterfaces:
BaseSession, java.io.Serializable, Wrapper

public interface RawSession
extends BaseSession

This interface append to base interface specific methods for creating and send raw diameter messages

Version:
1.5.1 Final

Method Summary
 Message createMessage(int commandCode, ApplicationId applicationId, Avp... avp)
          Returns a new message object with the specified command code, applicationId and predefined avps.
 Message createMessage(int commandCode, ApplicationId applicationId, long hopByHopIdentifier, long endToEndIdentifier, Avp... avp)
          Returns a new message object with the predefined Command-code, ApplicationId, HopByHopIdentifier, EndToEndIdentifier This method allow created message from storage or created specific message.
 Message createMessage(Message message, boolean copyAvps)
          Returns a new message object with the copy of parent message header
 void send(Message message, EventListener<Message,Message> listener)
          Sends and wait response message with default timeout
 void send(Message message, EventListener<Message,Message> listener, long timeOut, java.util.concurrent.TimeUnit timeUnit)
          Sends and wait response message with defined timeout
 
Methods inherited from interface org.jdiameter.api.BaseSession
getCreationTime, getLastAccessedTime, isValid, release, send, send
 
Methods inherited from interface org.jdiameter.api.Wrapper
isWrapperFor, unwrap
 

Method Detail

createMessage

Message createMessage(int commandCode,
                      ApplicationId applicationId,
                      Avp... avp)
Returns a new message object with the specified command code, applicationId and predefined avps.

Parameters:
commandCode - code of message
applicationId - applicationId of destination application
avp - array of avps
Returns:
new message object

createMessage

Message createMessage(int commandCode,
                      ApplicationId applicationId,
                      long hopByHopIdentifier,
                      long endToEndIdentifier,
                      Avp... avp)
Returns a new message object with the predefined Command-code, ApplicationId, HopByHopIdentifier, EndToEndIdentifier This method allow created message from storage or created specific message.

Parameters:
commandCode - code of message
applicationId - applicationId of destination application
hopByHopIdentifier - hop by hop identifier of message
endToEndIdentifier - end to end identifier of message
avp - array of avps
Returns:
new message object

createMessage

Message createMessage(Message message,
                      boolean copyAvps)
Returns a new message object with the copy of parent message header

Parameters:
message - origination message
copyAvps - if true all avps will be copy to new message
Returns:
Returns a new message object with the copy of parent message header

send

void send(Message message,
          EventListener<Message,Message> listener)
          throws InternalException,
                 IllegalDiameterStateException,
                 RouteException,
                 OverloadException
Sends and wait response message with default timeout

Parameters:
message - request/answer diameter message
listener - event listener
Throws:
InternalException - The InternalException signals that internal error is occurred.
IllegalDiameterStateException - The IllegalStateException signals that session has incorrect state (invalid).
RouteException - The NoRouteException signals that no route exist for a given realm.
OverloadException - The OverloadException signals that destination host is overloaded.

send

void send(Message message,
          EventListener<Message,Message> listener,
          long timeOut,
          java.util.concurrent.TimeUnit timeUnit)
          throws InternalException,
                 IllegalDiameterStateException,
                 RouteException,
                 OverloadException
Sends and wait response message with defined timeout

Parameters:
message - request/answer diameter message
listener - event listener
timeOut - value of timeout
timeUnit - type of timeOut value
Throws:
InternalException - The InternalException signals that internal error is occurred.
IllegalDiameterStateException - The IllegalStateException signals that session has incorrect state (invalid).
RouteException - The NoRouteException signals that no route exist for a given realm.
OverloadException - The OverloadException signals that destination host is overloaded.


Copyright © 2010. All Rights Reserved.