Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.extend
Class ScriptConduit

    java.lang.Object
      org.directwebremoting.extend.ScriptConduit

All Implemented Interfaces:
  java.lang.Comparable

Direct Known Subclasses:
  BaseScriptConduit, NotifyOnlyScriptConduit, ResumeContinuationScriptConduit

    public abstract class ScriptConduit

extends java.lang.Object
implements java.lang.Comparable

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.

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

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)`
`int` | `getRank()` ScriptConduits have a rank that indicates the priority order in which we should send scripts to them.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### RANK_PROCEDURAL

    public static final 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

  See Also:
    Constant Field Values

### RANK_FAST

    public static final 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

  See Also:
    Constant Field Values

### RANK_SLOW

    public static final 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.

  See Also:
    Constant Field Values

Constructor Detail

### ScriptConduit

    public ScriptConduit(int rank)

  All ScriptConduit need a rank

  Parameters:
    `rank` - How does this ScriptConduit sort

Method Detail

### getRank

    public int getRank()

  ScriptConduits have a rank that indicates the priority order in which we should send scripts to them. The rank is a number from 1 to 10, and should only be one of the defined values: ScriptConduit.RANK_*.

  Returns:
    The rank of this ScriptConduit
  See Also:
    `RANK_PROCEDURAL`, `RANK_FAST`, `RANK_SLOW`

### addScript

    public abstract boolean addScript(ScriptBuffer script)
                               throws java.io.IOException,
                                      MarshallException

  Add a script to the list bound for remote execution.

  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().

  Parameters:
    `script` - The script to execute
  Returns:
    true if this ScriptConduit handled the script.
  Throws:
    `java.io.IOException` - If this conduit is broken and should not be used
    `MarshallException` - If objects in the script can not be marshalled

### compareTo

    public int compareTo(java.lang.Object obj)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD