|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.extend.ScriptConduit
public abstract class ScriptConduit
While a Marshaller is processing a request it can register a ScriptConduit with the ScriptSession to say - pass scripts straight to me and bypass the temporary storage area. This interface allows this to happen.
Field Summary | |
---|---|
static int |
RANK_FAST
Indicates that this ScriptConduit is a very good way of getting scripts to the client and should be used as a preferred method |
static int |
RANK_PROCEDURAL
Indicates that this ScriptConduit is used for control-flow and will probably not actually convey the script, but does need to tell someone else about it |
static int |
RANK_SLOW
Indicates that this ScriptConduit is a poor way of getting scripts to the client and should only be used as a last resort. |
Constructor Summary | |
---|---|
ScriptConduit(int rank)
All ScriptConduit need a rank |
Method Summary | |
---|---|
abstract boolean |
addScript(ScriptBuffer script)
Add a script to the list bound for remote execution. |
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object obj)
|
int |
getRank()
ScriptConduits have a rank that indicates the priority order in which we should send scripts to them. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RANK_PROCEDURAL
public static final int RANK_FAST
public static final int RANK_SLOW
Constructor Detail |
---|
public ScriptConduit(int rank)
rank
- How does this ScriptConduit sortMethod Detail |
---|
public int getRank()
RANK_PROCEDURAL
,
RANK_FAST
,
RANK_SLOW
public abstract boolean addScript(ScriptBuffer script) throws java.io.IOException, MarshallException
It is not an error to refuse to handle the script and return false, it
just indicates that this ScriptConduit did not accept the script.
If the ScriptConduit can no longer function then it should throw an
exception and it will be asumed to be no longer useful.
If you want to implement this method then you will probably be doing
something like calling ServletOutputStream.print(String)
and
passing in the results of calling ScriptBufferUtil.createOutput().
script
- The script to execute
java.io.IOException
- If this conduit is broken and should not be used
MarshallException
- If objects in the script can not be marshalledpublic int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
Copyright ? 2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |