Cosmetics and an extra method in the TransformLayer that allows capturing messages before they are sent.

cusax-fix
Emil Ivov 17 years ago
parent daa208a792
commit 073ca80d9e

@ -302,7 +302,7 @@ private synchronized CallSipImpl createOutgoingCall(Address calleeAddress,
{
inviteTransaction.sendRequest();
if (logger.isDebugEnabled())
logger.debug("sent request: " + invite);
logger.debug("sent request:\n" + invite);
}
catch (SipException ex)
{
@ -3162,10 +3162,10 @@ public void setMute(CallParticipant participant, boolean mute)
}
/**
* Returns <code>true</code> to indicate that the call associated with the
* Returns <code>true</code> to indicate that the call associated with the
* given participant is secured, otherwise returns <code>false</code>.
*
* @return <code>true</code> to indicate that the call associated with the
*
* @return <code>true</code> to indicate that the call associated with the
* given participant is secured, otherwise returns <code>false</code>.
*/
public boolean isSecure(CallParticipant participant)
@ -3178,8 +3178,8 @@ public boolean isSecure(CallParticipant participant)
/**
* Sets the SAS verification property value for the given call participant.
*
* @param participant the call participant, for which we set the
*
* @param participant the call participant, for which we set the
* @param isVerified indicates whether the SAS string is verified or not
* for the given participant.
*/

@ -633,7 +633,7 @@ public void processTransactionTerminated(TransactionTerminatedEvent
}
Request request = transaction.getRequest();
logger.debug("Transaction terminated for req=" + request);
logger.debug("Transaction terminated for req=\n" + request);
//find the object that is supposed to take care of responses with the
//corresponding method

@ -411,7 +411,7 @@ void register()
try
{
regTrans.sendRequest();
logger.debug("sent request= " + request);
logger.debug("sent request=\n" + request);
}
//we sometimes get a null pointer exception here so catch them all
catch (Exception ex)
@ -442,11 +442,6 @@ void register()
public void processOK(ClientTransaction clientTransatcion,
Response response)
{
FromHeader fromHeader =
( (FromHeader) response.getHeader(FromHeader.NAME));
//first extract the expires value that we requested
int requestedExpiration = 0;
Request register = clientTransatcion.getRequest();
@ -673,7 +668,7 @@ private void unregister(boolean sendUnregister) throws OperationFailedException
unregisterTransaction.sendRequest();
logger.info("sent request: " + unregisterRequest);
logger.info("sent request:\n" + unregisterRequest);
//if we're currently registered or in a process of unregistering
//we'll wait for an ok response before changing the status.
@ -910,11 +905,6 @@ public boolean processResponse(ResponseEvent responseEvent)
.getClientTransaction();
Response response = responseEvent.getResponse();
Dialog dialog = clientTransaction.getDialog();
String method = ( (CSeqHeader) response.getHeader(CSeqHeader.NAME)).
getMethod();
Response responseClone = (Response) response.clone();
SipProvider sourceProvider = (SipProvider)responseEvent.getSource();
boolean processed = false;

@ -48,6 +48,26 @@ public interface TransformLayer
*/
public MessageReceivedEvent messageReceived(MessageReceivedEvent evt);
/**
* Called when the underlying implementation has just been asked by other
* bundles to send an outgoing message. The method returns an instance of
* <tt>MessageDeliveredEvent</tt> which in many cases would be different
* from the <tt>evt</tt> instance that was passed as a parameter. The param
* and the return instances could very well (and will often) be instances of
* different implementations so users of this interface (i.e. protocol
* implementors) should make no assumptions for the class of the return type
* and copy the returned instance into a new one if necessary.
*
* @param evt the MessageDeliveredEvent containing the id of the message
* that has caused the event.
*
* @return an instance of a (possibly new) <tt>MessageDeliveredEvent</tt>
* instance containing the transformed message or <tt>null</tt> if the
* <tt>TransportLayer</tt> has determined that this message event should not
* be delivered to the upper layers.
*/
public MessageDeliveredEvent messageDeliveryPending(MessageDeliveredEvent evt);
/**
* Called when the underlying implementation has received an indication
* that a message, sent earlier has been successfully received by the

Loading…
Cancel
Save