com.electrotank.electroserver4.extensions.api.value
Interface EsObjectRO

All Superinterfaces:
Iterable<EsObjectEntry>
All Known Implementing Classes:
EsObject

public interface EsObjectRO
extends Iterable<EsObjectEntry>

EsObjectRO is a read-only copy of an EsObject. EsObject facilitates the exchange of data between all layers of a multiplayer application.

EsObject is an object that supports a large number of data types. It allows the server and client, or clients and other clients, to exchange simple or complex object structures that retain data types. In addition, EsObjects are used in many places when dealing with extensions and values for room variables, user variables, and user server variables.

One of the most attractive benefits of an EsObject is that it allows for data to be sent across languages cleanly and easily. A plugin written in ActionScript can create an EsObject and send it to a Java client and both sides will treat it consistently. There is no need to perform any messy conversions. For example: A Flash client can create an EsObject, populate it with strings, numbers and arrays of information, and then just send it to a server plugin. The plugin receives this EsObject and can access all of that information.

See Also:
ElectroServer 4 Manual, Understanding the EsObject, EsObjectEntry, EsObject

Method Summary
 boolean getBoolean(String name)
          Gets the boolean value of the named entry.
 boolean getBoolean(String name, boolean defaultValue)
          Gets the boolean value of the named entry, or the default value if any exception occurs.
 boolean[] getBooleanArray(String name)
          Gets the boolean array value of the named entry.
 boolean[] getBooleanArray(String name, boolean[] defaultValue)
          Gets the boolean array value of the named entry, or the default value if any exception occurs.
 byte getByte(String name)
          Gets the byte value of the named entry.
 byte getByte(String name, byte defaultValue)
          Gets the byte value of the named entry, or the default value if any exception occurs.
 byte[] getByteArray(String name)
          Gets the byte array value of the named entry.
 byte[] getByteArray(String name, byte[] defaultValue)
          Gets the byte array value of the named entry, or the default value if any exception occurs.
 char getChar(String name)
          Gets the char value of the named entry.
 char getChar(String name, char defaultValue)
          Gets the char value of the named entry, or the default value if any exception occurs.
 char[] getCharArray(String name)
          Gets the char array value of the named entry.
 char[] getCharArray(String name, char[] defaultValue)
          Gets the char array value of the named entry, or the default value if any exception occurs.
 double getDouble(String name)
          Gets the double value of the named entry.
 double getDouble(String name, double defaultValue)
          Gets the double value of the named entry, or the default value if any exception occurs.
 double[] getDoubleArray(String name)
          Gets the double array value of the named entry.
 double[] getDoubleArray(String name, double[] defaultValue)
          Gets the double array value of the named entry, or the default value if any exception occurs.
 EsObject getEsObject(String name)
          Gets the EsObject value of the named entry.
 EsObject getEsObject(String name, EsObject defaultValue)
          Gets the EsObject value of the named entry, or the default value if any exception occurs.
 EsObject[] getEsObjectArray(String name)
          Gets the EsObject array value of the named entry.
 EsObject[] getEsObjectArray(String name, EsObject[] defaultValue)
          Gets the EsObject array value of the named entry, or the default value if any exception occurs.
 float getFloat(String name)
          Gets the float value of the named entry.
 float getFloat(String name, float defaultValue)
          Gets the float value of the named entry, or the default value if any exception occurs.
 float[] getFloatArray(String name)
          Gets the float array value of the named entry.
 float[] getFloatArray(String name, float[] defaultValue)
          Gets the float array value of the named entry, or the default value if any exception occurs.
 int getInteger(String name)
          Gets the integer value of the named entry.
 int getInteger(String name, int defaultValue)
          Gets the integer value of the named entry, or the default value if any exception occurs.
 int[] getIntegerArray(String name)
          Gets the int array value of the named entry.
 int[] getIntegerArray(String name, int[] defaultValue)
          Gets the int array value of the named entry, or the default value if any exception occurs.
 long getLong(String name)
          Gets the long value of the named entry.
 long getLong(String name, long defaultValue)
          Gets the long value of the named entry, or the default value if any exception occurs.
 long[] getLongArray(String name)
          Gets the long array value of the named entry.
 long[] getLongArray(String name, long[] defaultValue)
          Gets the long array value of the named entry, or the default value if any exception occurs.
 Number getNumber(String name)
          Gets the Number value of the named entry.
 Number getNumber(String name, Number defaultValue)
          Gets the Number value of the named entry, or the default value if any exception occurs.
 Number[] getNumberArray(String name)
          Gets the Number array value of the named entry.
 Number[] getNumberArray(String name, Number[] defaultValue)
          Gets the Number array value of the named entry, or the default value if any exception occurs.
 Object getRawVariable(String name)
          Gets the raw value of the named variable, as an Object.
 short getShort(String name)
          Gets the short value of the named entry.
 short getShort(String name, short defaultValue)
          Gets the short value of the named entry, or the default value if any exception occurs.
 short[] getShortArray(String name)
          Gets the short array value of the named entry.
 short[] getShortArray(String name, short[] defaultValue)
          Gets the short array value of the named entry, or the default value if any exception occurs.
 int getSize()
          Gets the number of values stored in the EsObject.
 String getString(String name)
          Gets the string value of the named entry.
 String getString(String name, String defaultValue)
          Gets the String value of the named entry, or the default value if any exception occurs.
 String[] getStringArray(String name)
          Gets the string array value of the named entry.
 String[] getStringArray(String name, String[] defaultValue)
          Gets the string array value of the named entry, or the default value if any exception occurs.
 boolean variableExists(String name)
          Returns true if an entry exists with the given name.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getSize

int getSize()
Gets the number of values stored in the EsObject.

Returns:
size

getInteger

int getInteger(String name)
Gets the integer value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getInteger

int getInteger(String name,
               int defaultValue)
Gets the integer value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getString

String getString(String name)
Gets the string value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getString

String getString(String name,
                 String defaultValue)
Gets the String value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getDouble

double getDouble(String name)
Gets the double value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getDouble

double getDouble(String name,
                 double defaultValue)
Gets the double value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getFloat

float getFloat(String name)
Gets the float value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getFloat

float getFloat(String name,
               float defaultValue)
Gets the float value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getBoolean

boolean getBoolean(String name)
Gets the boolean value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getBoolean

boolean getBoolean(String name,
                   boolean defaultValue)
Gets the boolean value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getByte

byte getByte(String name)
Gets the byte value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getByte

byte getByte(String name,
             byte defaultValue)
Gets the byte value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getChar

char getChar(String name)
Gets the char value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getChar

char getChar(String name,
             char defaultValue)
Gets the char value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getLong

long getLong(String name)
Gets the long value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getLong

long getLong(String name,
             long defaultValue)
Gets the long value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getShort

short getShort(String name)
Gets the short value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getShort

short getShort(String name,
               short defaultValue)
Gets the short value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getEsObject

EsObject getEsObject(String name)
Gets the EsObject value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getEsObject

EsObject getEsObject(String name,
                     EsObject defaultValue)
Gets the EsObject value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getNumber

Number getNumber(String name)
Gets the Number value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getNumber

Number getNumber(String name,
                 Number defaultValue)
Gets the Number value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getIntegerArray

int[] getIntegerArray(String name)
Gets the int array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getIntegerArray

int[] getIntegerArray(String name,
                      int[] defaultValue)
Gets the int array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getStringArray

String[] getStringArray(String name)
Gets the string array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getStringArray

String[] getStringArray(String name,
                        String[] defaultValue)
Gets the string array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getDoubleArray

double[] getDoubleArray(String name)
Gets the double array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getDoubleArray

double[] getDoubleArray(String name,
                        double[] defaultValue)
Gets the double array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getFloatArray

float[] getFloatArray(String name)
Gets the float array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getFloatArray

float[] getFloatArray(String name,
                      float[] defaultValue)
Gets the float array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getBooleanArray

boolean[] getBooleanArray(String name)
Gets the boolean array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getBooleanArray

boolean[] getBooleanArray(String name,
                          boolean[] defaultValue)
Gets the boolean array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getByteArray

byte[] getByteArray(String name)
Gets the byte array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getByteArray

byte[] getByteArray(String name,
                    byte[] defaultValue)
Gets the byte array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getCharArray

char[] getCharArray(String name)
Gets the char array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getCharArray

char[] getCharArray(String name,
                    char[] defaultValue)
Gets the char array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getLongArray

long[] getLongArray(String name)
Gets the long array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getLongArray

long[] getLongArray(String name,
                    long[] defaultValue)
Gets the long array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getShortArray

short[] getShortArray(String name)
Gets the short array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getShortArray

short[] getShortArray(String name,
                      short[] defaultValue)
Gets the short array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getEsObjectArray

EsObject[] getEsObjectArray(String name)
Gets the EsObject array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getEsObjectArray

EsObject[] getEsObjectArray(String name,
                            EsObject[] defaultValue)
Gets the EsObject array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

getNumberArray

Number[] getNumberArray(String name)
Gets the Number array value of the named entry.

Parameters:
name - name of the entry
Returns:
value

getNumberArray

Number[] getNumberArray(String name,
                        Number[] defaultValue)
Gets the Number array value of the named entry, or the default value if any exception occurs.

Parameters:
name - name of the entry
defaultValue - value to return if an exception occurs
Returns:
value

variableExists

boolean variableExists(String name)
Returns true if an entry exists with the given name.

Parameters:
name - name of the variable
Returns:
true if an entry exists with that name

getRawVariable

Object getRawVariable(String name)
Gets the raw value of the named variable, as an Object.

Parameters:
name - name of the variable
Returns:
raw value (Object)


Copyright © 2007 Electrotank, Inc. All Rights Reserved.