org.codehaus.wadi.core.util
Class Utils

java.lang.Object
  extended by org.codehaus.wadi.core.util.Utils

public class Utils
extends java.lang.Object

A collection of useful static functions

Version:
$Revision: 2484 $
Author:
Jules Gosnell

Constructor Summary
Utils()
           
 
Method Summary
static byte[] getContent(java.io.Externalizable object, Streamer streamer)
           
static Motable mote(Emoter emoter, Immoter immoter, Motable emotable, java.lang.String name)
          Mote (in other words - move) the data held in a Motable from one Contextualiser to another, such that if the two Contextualisers store Motables in a persistant fashion, the data is never present in less than one of the two.
static java.io.Externalizable setContent(java.io.Externalizable object, byte[] content, Streamer streamer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

mote

public static Motable mote(Emoter emoter,
                           Immoter immoter,
                           Motable emotable,
                           java.lang.String name)
Mote (in other words - move) the data held in a Motable from one Contextualiser to another, such that if the two Contextualisers store Motables in a persistant fashion, the data is never present in less than one of the two.

Parameters:
emoter - - delegate for the source Contextualiser
immoter - - delegate for the target Contextualiser
emotable - - data to be moved
name - - the id of said data
Returns:
- the resulting immotable - in other words - the data's new representation in the target Contextualiser

getContent

public static byte[] getContent(java.io.Externalizable object,
                                Streamer streamer)
                         throws java.io.IOException
Throws:
java.io.IOException

setContent

public static java.io.Externalizable setContent(java.io.Externalizable object,
                                                byte[] content,
                                                Streamer streamer)
                                         throws java.io.IOException,
                                                java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2010. All Rights Reserved.