Openfire 3.6.0 Javadoc

org.jivesoftware.util.cache
Class DummyExternalizableUtil

java.lang.Object
  extended by org.jivesoftware.util.cache.DummyExternalizableUtil
All Implemented Interfaces:
ExternalizableUtilStrategy

public class DummyExternalizableUtil
extends Object
implements ExternalizableUtilStrategy

Dummy implementation that does nothing. The open source version of the server uses this strategy.

Author:
Gaston Dombiak

Constructor Summary
DummyExternalizableUtil()
           
 
Method Summary
 boolean readBoolean(DataInput in)
           
 byte[] readByteArray(DataInput in)
           
 int readExternalizableCollection(DataInput in, Collection<? extends Externalizable> value, ClassLoader loader)
           
 int readExternalizableMap(DataInput in, Map<String,? extends Externalizable> map, ClassLoader loader)
           
 int readInt(DataInput in)
           
 long readLong(DataInput in)
           
 long[] readLongArray(DataInput in)
          Reads an array of long values.
 Map readLongIntMap(DataInput in)
          Reads a Map of Long key and Integer value pairs.
 String readSafeUTF(DataInput in)
           
 Serializable readSerializable(DataInput in)
           
 List<String> readStringList(DataInput in)
          Reads a List of Strings.
 Map<String,String> readStringMap(DataInput in)
          Reads a Map of String key and value pairs.
 int readStrings(DataInput in, Collection<String> collection)
           
 int readStringsMap(DataInput in, Map<String,Set<String>> map)
           
 void writeBoolean(DataOutput out, boolean value)
           
 void writeByteArray(DataOutput out, byte[] value)
           
 void writeExternalizableCollection(DataOutput out, Collection<? extends Externalizable> value)
           
 void writeExternalizableMap(DataOutput out, Map<String,? extends Externalizable> map)
           
 void writeInt(DataOutput out, int value)
           
 void writeLong(DataOutput out, long value)
           
 void writeLongArray(DataOutput out, long[] array)
          Writes an array of long values.
 void writeLongIntMap(DataOutput out, Map<Long,Integer> map)
          Writes a Map of Long key and Integer value pairs.
 void writeSafeUTF(DataOutput out, String value)
           
 void writeSerializable(DataOutput out, Serializable value)
           
 void writeStringList(DataOutput out, List stringList)
          Writes a List of Strings.
 void writeStringMap(DataOutput out, Map<String,String> stringMap)
          Writes a Map of String key and value pairs.
 void writeStrings(DataOutput out, Collection<String> collection)
           
 void writeStringsMap(DataOutput out, Map<String,Set<String>> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyExternalizableUtil

public DummyExternalizableUtil()
Method Detail

writeStringMap

public void writeStringMap(DataOutput out,
                           Map<String,String> stringMap)
                    throws IOException
Writes a Map of String key and value pairs. This method handles the case when the Map is null.

Specified by:
writeStringMap in interface ExternalizableUtilStrategy
Parameters:
out - the output stream.
stringMap - the Map of String key/value pairs.
Throws:
IOException - if an error occurs.

readStringMap

public Map<String,String> readStringMap(DataInput in)
                                 throws IOException
Reads a Map of String key and value pairs. This method will return null if the Map written to the stream was null.

Specified by:
readStringMap in interface ExternalizableUtilStrategy
Parameters:
in - the input stream.
Returns:
a Map of String key/value pairs.
Throws:
IOException - if an error occurs.

writeLongIntMap

public void writeLongIntMap(DataOutput out,
                            Map<Long,Integer> map)
                     throws IOException
Writes a Map of Long key and Integer value pairs. This method handles the case when the Map is null.

Specified by:
writeLongIntMap in interface ExternalizableUtilStrategy
Parameters:
out - the output stream.
map - the Map of Long key/Integer value pairs.
Throws:
IOException - if an error occurs.

readLongIntMap

public Map readLongIntMap(DataInput in)
                   throws IOException
Reads a Map of Long key and Integer value pairs. This method will return null if the Map written to the stream was null.

Specified by:
readLongIntMap in interface ExternalizableUtilStrategy
Parameters:
in - the input stream.
Returns:
a Map of Long key/Integer value pairs.
Throws:
IOException - if an error occurs.

writeStringList

public void writeStringList(DataOutput out,
                            List stringList)
                     throws IOException
Writes a List of Strings. This method handles the case when the List is null.

Specified by:
writeStringList in interface ExternalizableUtilStrategy
Parameters:
out - the output stream.
stringList - the List of Strings.
Throws:
IOException - if an error occurs.

readStringList

public List<String> readStringList(DataInput in)
                            throws IOException
Reads a List of Strings. This method will return null if the List written to the stream was null.

Specified by:
readStringList in interface ExternalizableUtilStrategy
Parameters:
in - the input stream.
Returns:
a List of Strings.
Throws:
IOException - if an error occurs.

writeLongArray

public void writeLongArray(DataOutput out,
                           long[] array)
                    throws IOException
Writes an array of long values. This method handles the case when the array is null.

Specified by:
writeLongArray in interface ExternalizableUtilStrategy
Parameters:
out - the output stream.
array - the array of long values.
Throws:
IOException - if an error occurs.

readLongArray

public long[] readLongArray(DataInput in)
                     throws IOException
Reads an array of long values. This method will return null if the array written to the stream was null.

Specified by:
readLongArray in interface ExternalizableUtilStrategy
Parameters:
in - the input stream.
Returns:
an array of long values.
Throws:
IOException - if an error occurs.

writeLong

public void writeLong(DataOutput out,
                      long value)
Specified by:
writeLong in interface ExternalizableUtilStrategy

readLong

public long readLong(DataInput in)
Specified by:
readLong in interface ExternalizableUtilStrategy

writeBoolean

public void writeBoolean(DataOutput out,
                         boolean value)
Specified by:
writeBoolean in interface ExternalizableUtilStrategy

readBoolean

public boolean readBoolean(DataInput in)
Specified by:
readBoolean in interface ExternalizableUtilStrategy

writeByteArray

public void writeByteArray(DataOutput out,
                           byte[] value)
                    throws IOException
Specified by:
writeByteArray in interface ExternalizableUtilStrategy
Throws:
IOException

readByteArray

public byte[] readByteArray(DataInput in)
                     throws IOException
Specified by:
readByteArray in interface ExternalizableUtilStrategy
Throws:
IOException

writeSerializable

public void writeSerializable(DataOutput out,
                              Serializable value)
                       throws IOException
Specified by:
writeSerializable in interface ExternalizableUtilStrategy
Throws:
IOException

readSerializable

public Serializable readSerializable(DataInput in)
                              throws IOException
Specified by:
readSerializable in interface ExternalizableUtilStrategy
Throws:
IOException

writeSafeUTF

public void writeSafeUTF(DataOutput out,
                         String value)
Specified by:
writeSafeUTF in interface ExternalizableUtilStrategy

readSafeUTF

public String readSafeUTF(DataInput in)
Specified by:
readSafeUTF in interface ExternalizableUtilStrategy

writeExternalizableCollection

public void writeExternalizableCollection(DataOutput out,
                                          Collection<? extends Externalizable> value)
                                   throws IOException
Specified by:
writeExternalizableCollection in interface ExternalizableUtilStrategy
Throws:
IOException

readExternalizableCollection

public int readExternalizableCollection(DataInput in,
                                        Collection<? extends Externalizable> value,
                                        ClassLoader loader)
                                 throws IOException
Specified by:
readExternalizableCollection in interface ExternalizableUtilStrategy
Throws:
IOException

writeExternalizableMap

public void writeExternalizableMap(DataOutput out,
                                   Map<String,? extends Externalizable> map)
                            throws IOException
Specified by:
writeExternalizableMap in interface ExternalizableUtilStrategy
Throws:
IOException

readExternalizableMap

public int readExternalizableMap(DataInput in,
                                 Map<String,? extends Externalizable> map,
                                 ClassLoader loader)
                          throws IOException
Specified by:
readExternalizableMap in interface ExternalizableUtilStrategy
Throws:
IOException

writeStringsMap

public void writeStringsMap(DataOutput out,
                            Map<String,Set<String>> map)
                     throws IOException
Specified by:
writeStringsMap in interface ExternalizableUtilStrategy
Throws:
IOException

readStringsMap

public int readStringsMap(DataInput in,
                          Map<String,Set<String>> map)
                   throws IOException
Specified by:
readStringsMap in interface ExternalizableUtilStrategy
Throws:
IOException

writeStrings

public void writeStrings(DataOutput out,
                         Collection<String> collection)
                  throws IOException
Specified by:
writeStrings in interface ExternalizableUtilStrategy
Throws:
IOException

readStrings

public int readStrings(DataInput in,
                       Collection<String> collection)
                throws IOException
Specified by:
readStrings in interface ExternalizableUtilStrategy
Throws:
IOException

writeInt

public void writeInt(DataOutput out,
                     int value)
Specified by:
writeInt in interface ExternalizableUtilStrategy

readInt

public int readInt(DataInput in)
Specified by:
readInt in interface ExternalizableUtilStrategy

Openfire 3.6.0 Javadoc

Copyright © 2003-2008 Jive Software.