|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.owasp.webscarab.plugin.scripted.ScriptedObjectModel
public class ScriptedObjectModel
Provides a wrapper around the Scripting plugin, so that we do not expose potentially dangerous methods, such as adding listeners, stopping the plugin, etc
| Constructor Summary | |
|---|---|
ScriptedObjectModel(Framework framework,
Scripted scripted)
Creates a new instance of ScriptedObjectModel |
|
| Method Summary | |
|---|---|
ConversationID |
addConversation(Response response)
adds a conversation to the overall WebScarab framework. |
Response |
fetchResponse(Request request)
instructs WebScarab to submit the supplied Request to the appropriate server, and return the corresponding corresponding Response to the caller |
Response |
getAsyncResponse()
gets an asynchronous Response that corresponds to a previous Request The actual Request can be obtained using the Response.getRequest() method |
HttpUrl |
getChildAt(java.lang.String url,
int index)
returns the indicated child of the supplied URL |
int |
getChildCount(java.lang.String url)
returns the number of URLs under the supplied URL |
ConversationID |
getConversationAt(int index)
returns the identifier of the conversation at the specified index |
int |
getConversationCount()
returns the number of conversations for the specified URL. |
java.lang.String |
getConversationProperty(ConversationID id,
java.lang.String property)
|
java.lang.String |
getConversationProperty(int id,
java.lang.String property)
|
Request |
getRequest(ConversationID id)
returns a copy of the desired Request, or null if the id did not exist |
Request |
getRequest(int id)
convenience method, saving the user from doing "new ConversationID(1)" each time returns a copy of the desired Request, or null if the id did not exist |
Response |
getResponse(ConversationID id)
returns a copy of the desired Response, or null if the id did not exist |
Response |
getResponse(int id)
convenience method, saving the user from doing "new ConversationID(1)" each time returns a copy of the desired Response, or null if the id did not exist |
java.lang.String |
getUrlProperty(java.lang.String url,
java.lang.String property)
|
boolean |
hasAsyncCapacity()
checks whether the Scripted plugin can accept any more Requests for asynchronous fetching |
boolean |
hasAsyncResponse()
checks whether the Scripted plugin has a Response ready |
boolean |
isAsyncBusy()
checks whether the Scripted plugin is still busy fetching Requests |
void |
submitAsyncRequest(Request request)
instructs the Scripted plugin to fetch the supplied Request asynchronously returns immediately without waiting for the Response |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptedObjectModel(Framework framework,
Scripted scripted)
framework - The framework that holds WebScarab togetherscripted - the scripting plugin that we interact with| Method Detail |
|---|
public ConversationID addConversation(Response response)
response - the Response to add to the framework
public Request getRequest(int id)
id - the numerical id of the request
public Request getRequest(ConversationID id)
id - the numerical id of the request
public Response getResponse(int id)
id - the numerical id of the response
public Response getResponse(ConversationID id)
id - the numerical id of the response
public int getChildCount(java.lang.String url)
throws java.net.MalformedURLException
url - the url
java.net.MalformedURLException - if the url is malformed
public HttpUrl getChildAt(java.lang.String url,
int index)
throws java.net.MalformedURLException
url - the parent urlindex - the index of the desired child
java.net.MalformedURLException - if the url is malformed
public java.lang.String getUrlProperty(java.lang.String url,
java.lang.String property)
throws java.net.MalformedURLException
url - property -
java.net.MalformedURLExceptionpublic int getConversationCount()
java.net.MalformedURLException - if the URL is malformedpublic ConversationID getConversationAt(int index)
index -
public java.lang.String getConversationProperty(int id,
java.lang.String property)
id - property -
public java.lang.String getConversationProperty(ConversationID id,
java.lang.String property)
id - property -
public Response fetchResponse(Request request)
throws java.io.IOException
request - the Request to execute
java.io.IOException - if there is any connectivity problempublic boolean hasAsyncCapacity()
public void submitAsyncRequest(Request request)
request - the Request to executepublic boolean isAsyncBusy()
public boolean hasAsyncResponse()
public Response getAsyncResponse()
throws java.io.IOException
java.io.IOException - if there was any problem fetching the Response
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||