Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.callhistory
Class CallRecord

java.lang.Object
  extended by net.java.sip.communicator.service.callhistory.CallRecord
Direct Known Subclasses:
CallRecordImpl

public class CallRecord
extends Object

Structure used for encapsulating data when writing or reading Call History Data. Also these records are used for returning data from the Call History Service.

Author:
Damian Minkov, Yana Stamcheva

Field Summary
protected  String direction
          Indicates the direction of the call - IN or OUT.
protected  int endReason
          This is the end reason of the call if any.
protected  Date endTime
          The end call date.
static String IN
          The incoming call direction.
static String OUT
          The outgoing call direction.
protected  List<CallPeerRecord> peerRecords
          A list of all peer records corresponding to this call record.
protected  ProtocolProviderService protocolProvider
          The protocol provider through which the call was made.
protected  Date startTime
          The start call date.
 
Constructor Summary
CallRecord()
          Creates CallRecord
CallRecord(String direction, Date startTime, Date endTime)
          Creates Call Record
 
Method Summary
 CallPeerRecord findPeerRecord(String address)
          Finds a CallPeer with the supplied address
 String getDirection()
          Returns the direction of the call IN or OUT
 int getEndReason()
          This is the end reason of the call if any.
 Date getEndTime()
          Returns the time when the call has finished
 List<CallPeerRecord> getPeerRecords()
          Return Vector of CallPeerRecords
 ProtocolProviderService getProtocolProvider()
          Returns the protocol provider used for the call.
 Date getStartTime()
          The time when the call has began
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUT

public static final String OUT
The outgoing call direction.

See Also:
Constant Field Values

IN

public static final String IN
The incoming call direction.

See Also:
Constant Field Values

direction

protected String direction
Indicates the direction of the call - IN or OUT.


peerRecords

protected final List<CallPeerRecord> peerRecords
A list of all peer records corresponding to this call record.


startTime

protected Date startTime
The start call date.


endTime

protected Date endTime
The end call date.


protocolProvider

protected ProtocolProviderService protocolProvider
The protocol provider through which the call was made.


endReason

protected int endReason
This is the end reason of the call if any. -1 default value for no reason specified.

Constructor Detail

CallRecord

public CallRecord()
Creates CallRecord


CallRecord

public CallRecord(String direction,
                  Date startTime,
                  Date endTime)
Creates Call Record

Parameters:
direction - String
startTime - Date
endTime - Date
Method Detail

findPeerRecord

public CallPeerRecord findPeerRecord(String address)
Finds a CallPeer with the supplied address

Parameters:
address - String
Returns:
CallPeerRecord

getDirection

public String getDirection()
Returns the direction of the call IN or OUT

Returns:
String

getEndTime

public Date getEndTime()
Returns the time when the call has finished

Returns:
Date

getPeerRecords

public List<CallPeerRecord> getPeerRecords()
Return Vector of CallPeerRecords

Returns:
Vector

getStartTime

public Date getStartTime()
The time when the call has began

Returns:
Date

getProtocolProvider

public ProtocolProviderService getProtocolProvider()
Returns the protocol provider used for the call. Could be null if the record has not saved the provider.

Returns:
the protocol provider used for the call

getEndReason

public int getEndReason()
This is the end reason of the call if any. -1 the default value for no reason specified.

Returns:
end reason code if any.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.