Package jadex.binary
Interface IEncodingContext
- 
- All Superinterfaces:
- IRootObjectContext,- IUserContextContainer
 - All Known Implementing Classes:
- AbstractEncodingContext,- DataOutputEncodingContext,- EncodingContext,- FramingEncodingContext
 
 public interface IEncodingContext extends IRootObjectContext Encoding context interface.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description longcreateObjectId()Creates ID for an object.java.lang.ClassLoadergetClassLoader()Gets the classloader.java.util.Set<java.lang.Class<?>>getNonInnerClassCache()Returns the non-inner class cache.java.lang.LonggetObjectId(java.lang.Object object)Gets the ID of a known object.java.util.List<ITraverseProcessor>getPreprocessors()Returns the preprocessors.longgetWrittenBytes()Returns the number of bytes written.voidsetIgnoreNextClassWrite(boolean state)Puts the context in a state where the next call to writeClass is ignored.voidsetInputObject(java.lang.Object object)Sets the object for which the next createObjectId() call creates an ID.voidstartObjectFrame()Starts an object frame when using a context with framing support.voidstartObjectFrame(boolean fixedsize)Starts an object frame when using a context with framing support.voidstopObjectFrame()Stops an object frame when using a context with framing support.voidwrite(byte[] b)Writes a byte array.voidwriteBoolean(boolean bool)Writes a boolean value.voidwriteByte(byte b)Writes a byte.voidwriteClass(java.lang.Class<?> clazz)Writes a class to the context.intwriteClassname(java.lang.String name)Writes the name of a class.voidwriteSignedVarInt(long value)Writes a signed variable integer to the encoding context.voidwriteString(java.lang.String string)Writes a string to the context.voidwriteVarInt(long value)Writes a variable integer to the encoding context.- 
Methods inherited from interface jadex.commons.transformation.traverser.IRootObjectContextgetRootObject
 - 
Methods inherited from interface jadex.commons.transformation.traverser.IUserContextContainergetUserContext
 
- 
 
- 
- 
- 
Method Detail- 
getPreprocessorsjava.util.List<ITraverseProcessor> getPreprocessors() Returns the preprocessors.- Returns:
- The preprocessors
 
 - 
getClassLoaderjava.lang.ClassLoader getClassLoader() Gets the classloader.- Returns:
- The classloader.
 
 - 
getNonInnerClassCachejava.util.Set<java.lang.Class<?>> getNonInnerClassCache() Returns the non-inner class cache.- Returns:
- The non-inner class cache.
 
 - 
setInputObjectvoid setInputObject(java.lang.Object object) Sets the object for which the next createObjectId() call creates an ID.- Parameters:
- object- The object.
 
 - 
createObjectIdlong createObjectId() Creates ID for an object.- Parameters:
- object- The object
- Returns:
- The ID.
 
 - 
getObjectIdjava.lang.Long getObjectId(java.lang.Object object) Gets the ID of a known object.- Parameters:
- object- The object
- Returns:
- The ID.
 
 - 
setIgnoreNextClassWritevoid setIgnoreNextClassWrite(boolean state) Puts the context in a state where the next call to writeClass is ignored.- Parameters:
- state- If true, the next class write will be ignored and the state reset.
 
 - 
writeBytevoid writeByte(byte b) Writes a byte.- Parameters:
- b- The byte.
 
 - 
writevoid write(byte[] b) Writes a byte array.- Parameters:
- b- The byte array.
 
 - 
writeBooleanvoid writeBoolean(boolean bool) Writes a boolean value.- Parameters:
- bool- The value.
 
 - 
writeStringvoid writeString(java.lang.String string) Writes a string to the context.- Parameters:
- string- The string.
 
 - 
writeVarIntvoid writeVarInt(long value) Writes a variable integer to the encoding context.- Parameters:
- value- The value.
 
 - 
writeSignedVarIntvoid writeSignedVarInt(long value) Writes a signed variable integer to the encoding context.- Parameters:
- value- The value.
 
 - 
writeClassvoid writeClass(java.lang.Class<?> clazz) Writes a class to the context.- Parameters:
- clazz- The class.
 
 - 
writeClassnameint writeClassname(java.lang.String name) Writes the name of a class.- Parameters:
- name- The name of the class.
 
 - 
getWrittenByteslong getWrittenBytes() Returns the number of bytes written.- Returns:
- The number of bytes written.
 
 - 
startObjectFramevoid startObjectFrame() Starts an object frame when using a context with framing support.
 - 
startObjectFramevoid startObjectFrame(boolean fixedsize) Starts an object frame when using a context with framing support.- Parameters:
- fixedsize- If true, use fixed-size (integer) framing. Set true if the object being framed is expected to be larger than 127 bytes (same type of object MUST use either fixed OR variable framing).
 
 - 
stopObjectFramevoid stopObjectFrame() Stops an object frame when using a context with framing support.
 
- 
 
-