org.owasp.webscarab.model
Class AbstractConversationModel

java.lang.Object
  extended by org.owasp.webscarab.model.AbstractConversationModel
All Implemented Interfaces:
ConversationModel
Direct Known Subclasses:
FilteredConversationModel

public abstract class AbstractConversationModel
extends java.lang.Object
implements ConversationModel

Author:
rogan

Constructor Summary
AbstractConversationModel(FrameworkModel model)
          Creates a new instance of AbstractConversationModel
 
Method Summary
 void addConversationListener(ConversationListener listener)
          adds a listener to the model
protected  void fireConversationAdded(ConversationID id, int position)
          tells listeners that a new Conversation has been added
protected  void fireConversationChanged(ConversationID id, int position)
          fired to tell listeners that a particular conversation has had a property change
protected  void fireConversationRemoved(ConversationID id, int position)
          tells listeners that a conversation has been removed, after the fact
protected  void fireConversationsChanged()
          fired to tell listeners that a particular conversation has had a property change
abstract  ConversationID getConversationAt(int index)
           
abstract  int getConversationCount()
           
 java.util.Date getConversationDate(ConversationID id)
           
 java.lang.String getConversationOrigin(ConversationID id)
           
abstract  int getIndexOfConversation(ConversationID id)
           
 Request getRequest(ConversationID id)
           
 java.lang.String getRequestMethod(ConversationID id)
           
 HttpUrl getRequestUrl(ConversationID id)
           
 Response getResponse(ConversationID id)
           
 java.lang.String getResponseStatus(ConversationID id)
           
abstract  EDU.oswego.cs.dl.util.concurrent.Sync readLock()
           
 void removeConversationListener(ConversationListener listener)
          adds a listener to the model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConversationModel

public AbstractConversationModel(FrameworkModel model)
Creates a new instance of AbstractConversationModel

Method Detail

getConversationCount

public abstract int getConversationCount()
Specified by:
getConversationCount in interface ConversationModel

getConversationAt

public abstract ConversationID getConversationAt(int index)
Specified by:
getConversationAt in interface ConversationModel

getIndexOfConversation

public abstract int getIndexOfConversation(ConversationID id)
Specified by:
getIndexOfConversation in interface ConversationModel

readLock

public abstract EDU.oswego.cs.dl.util.concurrent.Sync readLock()
Specified by:
readLock in interface ConversationModel

getConversationOrigin

public java.lang.String getConversationOrigin(ConversationID id)
Specified by:
getConversationOrigin in interface ConversationModel

getConversationDate

public java.util.Date getConversationDate(ConversationID id)
Specified by:
getConversationDate in interface ConversationModel

getRequestMethod

public java.lang.String getRequestMethod(ConversationID id)
Specified by:
getRequestMethod in interface ConversationModel

getResponseStatus

public java.lang.String getResponseStatus(ConversationID id)
Specified by:
getResponseStatus in interface ConversationModel

getRequestUrl

public HttpUrl getRequestUrl(ConversationID id)
Specified by:
getRequestUrl in interface ConversationModel

getRequest

public Request getRequest(ConversationID id)
Specified by:
getRequest in interface ConversationModel

getResponse

public Response getResponse(ConversationID id)
Specified by:
getResponse in interface ConversationModel

removeConversationListener

public void removeConversationListener(ConversationListener listener)
adds a listener to the model

Specified by:
removeConversationListener in interface ConversationModel
Parameters:
listener - the listener to add

addConversationListener

public void addConversationListener(ConversationListener listener)
adds a listener to the model

Specified by:
addConversationListener in interface ConversationModel
Parameters:
listener - the listener to add

fireConversationAdded

protected void fireConversationAdded(ConversationID id,
                                     int position)
tells listeners that a new Conversation has been added

Parameters:
id - the conversation
position - the position in the list

fireConversationRemoved

protected void fireConversationRemoved(ConversationID id,
                                       int position)
tells listeners that a conversation has been removed, after the fact

Parameters:
id - the conversation ID
position - the position in the overall conversation list prior to removal

fireConversationChanged

protected void fireConversationChanged(ConversationID id,
                                       int position)
fired to tell listeners that a particular conversation has had a property change

Parameters:
id - the conversation
property - the name of the property that was changed

fireConversationsChanged

protected void fireConversationsChanged()
fired to tell listeners that a particular conversation has had a property change

Parameters:
id - the conversation
property - the name of the property that was changed