public interface BSONCallback
| Modifier and Type | Method and Description | 
|---|---|
| Object | arrayDone()Called the end of the array, and returns the completed array. | 
| void | arrayStart()Signals the start of a BSON array. | 
| void | arrayStart(String name)Signals the start of a BSON array, with its field name. | 
| BSONCallback | createBSONCallback()Factory method for BSONCallbacks. | 
| Object | get()Returns the finished top-level Document. | 
| void | gotBinary(String name,
         byte type,
         byte[] data)Called when reading a field with a  BsonType.BINARYvalue. | 
| void | gotBinaryArray(String name,
              byte[] data)Deprecated.   | 
| void | gotBoolean(String name,
          boolean value)Called when reading a field with a  BsonType.BOOLEANvalue. | 
| void | gotCode(String name,
       String code)Called when reading a field with a  BsonType.JAVASCRIPTvalue. | 
| void | gotCodeWScope(String name,
             String code,
             Object scope)Called when reading a field with a  BsonType.JAVASCRIPT_WITH_SCOPEvalue. | 
| void | gotDate(String name,
       long millis)Called when reading a field with a  BsonType.DATE_TIMEvalue. | 
| void | gotDBRef(String name,
        String namespace,
        ObjectId id)Invoked when  BSONDecoderencountered aBsonType.DB_POINTERtype field in a byte sequence. | 
| void | gotDecimal128(String name,
             Decimal128 value)Called when reading a field with a  BsonType.DECIMAL128value. | 
| void | gotDouble(String name,
         double value)Called when reading a field with a  BsonType.DOUBLEvalue. | 
| void | gotInt(String name,
      int value)Called when reading a field with a  BsonType.INT32value. | 
| void | gotLong(String name,
       long value)Called when reading a field with a  BsonType.INT64value. | 
| void | gotMaxKey(String name)Called when reading a field with a  BsonType.MAX_KEYvalue. | 
| void | gotMinKey(String name)Called when reading a field with a  BsonType.MIN_KEYvalue. | 
| void | gotNull(String name)Called when reading a BSON field that exists but has a null value. | 
| void | gotObjectId(String name,
           ObjectId id)Called when reading a field with a  BsonType.OBJECT_IDvalue. | 
| void | gotRegex(String name,
        String pattern,
        String flags)Called when reading a field with a  BsonType.REGULAR_EXPRESSIONvalue. | 
| void | gotString(String name,
         String value)Called when reading a field with a  BsonType.STRINGvalue. | 
| void | gotSymbol(String name,
         String value)Called when reading a field with a  BsonType.SYMBOLvalue. | 
| void | gotTimestamp(String name,
            int time,
            int increment)Called when reading a field with a  BsonType.TIMESTAMPvalue. | 
| void | gotUndefined(String name)Called when reading a field with a  BsonType.UNDEFINEDvalue. | 
| void | gotUUID(String name,
       long part1,
       long part2)Called when reading a field with a  UUIDvalue. | 
| Object | objectDone()Called at the end of the document/array, and returns this object. | 
| void | objectStart()Signals the start of a BSON document, which usually maps onto some Java object. | 
| void | objectStart(String name)Signals the start of a BSON document, which usually maps onto some Java object. | 
| void | reset()Resets the callback, clearing all state. | 
void objectStart()
void objectStart(String name)
name - the field name of the document.Object objectDone()
void reset()
Object get()
BSONCallback createBSONCallback()
void arrayStart()
void arrayStart(String name)
name - the name of this array fieldObject arrayDone()
void gotNull(String name)
name - the name of the fieldBsonType.NULLvoid gotUndefined(String name)
BsonType.UNDEFINED value.name - the name of the fieldBsonType.UNDEFINEDvoid gotMinKey(String name)
BsonType.MIN_KEY value.name - the name of the fieldvoid gotMaxKey(String name)
BsonType.MAX_KEY value.name - the name of the fieldvoid gotBoolean(String name, boolean value)
BsonType.BOOLEAN value.name - the name of the fieldvalue - the field's valuevoid gotDouble(String name, double value)
BsonType.DOUBLE value.name - the name of the fieldvalue - the field's valuevoid gotDecimal128(String name, Decimal128 value)
BsonType.DECIMAL128 value.name - the field namevalue - the Decimal128 field valuevoid gotInt(String name, int value)
BsonType.INT32 value.name - the name of the fieldvalue - the field's valuevoid gotLong(String name, long value)
BsonType.INT64 value.name - the name of the fieldvalue - the field's valuevoid gotDate(String name, long millis)
BsonType.DATE_TIME value.name - the name of the fieldmillis - the date and time in millisecondsvoid gotString(String name, String value)
BsonType.STRING value.name - the name of the fieldvalue - the field's valuevoid gotSymbol(String name, String value)
BsonType.SYMBOL value.name - the name of the fieldvalue - the field's valuevoid gotRegex(String name, String pattern, String flags)
BsonType.REGULAR_EXPRESSION value.name - the name of the fieldpattern - the regex patternflags - the optional flags for the regular expressionvoid gotTimestamp(String name, int time, int increment)
BsonType.TIMESTAMP value.name - the name of the fieldtime - the time in seconds since epochincrement - an incrementing ordinal for operations within a given secondvoid gotObjectId(String name, ObjectId id)
BsonType.OBJECT_ID value.name - the name of the fieldid - the object IDvoid gotDBRef(String name, String namespace, ObjectId id)
BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence.name - the name of the fieldnamespace - the namespace to which reference is pointing toid - the if of the object to which reference is pointing to@Deprecated void gotBinaryArray(String name, byte[] data)
name - the name of the fielddata - the field's valuevoid gotBinary(String name, byte type, byte[] data)
BsonType.BINARY value. Note that binary values have a subtype, which may
 determine how the value is processed.name - the name of the fieldtype - one of the binary subtypes: BsonBinarySubTypedata - the field's valuevoid gotUUID(String name, long part1, long part2)
UUID value.  This is a binary value of subtype
 BsonBinarySubType.UUID_LEGACYname - the name of the fieldpart1 - the first part of the UUIDpart2 - the second part of the UUIDvoid gotCode(String name, String code)
BsonType.JAVASCRIPT value.name - the name of the fieldcode - the JavaScript codevoid gotCodeWScope(String name, String code, Object scope)
BsonType.JAVASCRIPT_WITH_SCOPE value.name - the name of the fieldcode - the JavaScript codescope - a document representing the scope for the code