Package org.bson
Interface BSONCallback
- All Known Subinterfaces:
DBCallback
- All Known Implementing Classes:
BasicBSONCallback,DefaultDBCallback,EmptyBSONCallback,JSONCallback,LazyBSONCallback,LazyDBCallback
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A callback interface for describing the structure of a BSON document. Implementations of this define how to turn BSON read from MongoDB
into Java objects.
See the BSON Spec.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Called the end of the array, and returns the completed array.voidDeprecated.Signals the start of a BSON array.voidarrayStart(String name) Deprecated.Signals the start of a BSON array, with its field name.Deprecated.Factory method for BSONCallbacks.get()Deprecated.Returns the finished top-level Document.voidDeprecated.Called when reading a field with aBsonType.BINARYvalue.voidgotBinaryArray(String name, byte[] data) Deprecated.this method is no longer called by the decodervoidgotBoolean(String name, boolean value) Deprecated.Called when reading a field with aBsonType.BOOLEANvalue.voidDeprecated.Called when reading a field with aBsonType.JAVASCRIPTvalue.voidgotCodeWScope(String name, String code, Object scope) Deprecated.Called when reading a field with aBsonType.JAVASCRIPT_WITH_SCOPEvalue.voidDeprecated.Called when reading a field with aBsonType.DATE_TIMEvalue.voidDeprecated.Invoked whenBSONDecoderencountered aBsonType.DB_POINTERtype field in a byte sequence.voidgotDecimal128(String name, Decimal128 value) Deprecated.Called when reading a field with aBsonType.DECIMAL128value.voidDeprecated.Called when reading a field with aBsonType.DOUBLEvalue.voidDeprecated.Called when reading a field with aBsonType.INT32value.voidDeprecated.Called when reading a field with aBsonType.INT64value.voidDeprecated.Called when reading a field with aBsonType.MAX_KEYvalue.voidDeprecated.Called when reading a field with aBsonType.MIN_KEYvalue.voidDeprecated.Called when reading a BSON field that exists but has a null value.voidgotObjectId(String name, ObjectId id) Deprecated.Called when reading a field with aBsonType.OBJECT_IDvalue.voidDeprecated.Called when reading a field with aBsonType.REGULAR_EXPRESSIONvalue.voidDeprecated.Called when reading a field with aBsonType.STRINGvalue.voidDeprecated.Called when reading a field with aBsonType.SYMBOLvalue.voidgotTimestamp(String name, int time, int increment) Deprecated.Called when reading a field with aBsonType.TIMESTAMPvalue.voidgotUndefined(String name) Deprecated.Called when reading a field with aBsonType.UNDEFINEDvalue.voidDeprecated.Called when reading a field with aUUIDvalue.Deprecated.Called at the end of the document/array, and returns this object.voidDeprecated.Signals the start of a BSON document, which usually maps onto some Java object.voidobjectStart(String name) Deprecated.Signals the start of a BSON document, which usually maps onto some Java object.voidreset()Deprecated.Resets the callback, clearing all state.
-
Method Details
-
objectStart
void objectStart()Deprecated.Signals the start of a BSON document, which usually maps onto some Java object. -
objectStart
Deprecated.Signals the start of a BSON document, which usually maps onto some Java object.- Parameters:
name- the field name of the document.
-
objectDone
Object objectDone()Deprecated.Called at the end of the document/array, and returns this object.- Returns:
- the Object that has been read from this section of the document.
-
reset
void reset()Deprecated.Resets the callback, clearing all state. -
get
Object get()Deprecated.Returns the finished top-level Document.- Returns:
- the top level document read from the database.
-
createBSONCallback
BSONCallback createBSONCallback()Deprecated.Factory method for BSONCallbacks.- Returns:
- a new BSONCallback.
-
arrayStart
void arrayStart()Deprecated.Signals the start of a BSON array. -
arrayStart
Deprecated.Signals the start of a BSON array, with its field name.- Parameters:
name- the name of this array field
-
arrayDone
Object arrayDone()Deprecated.Called the end of the array, and returns the completed array.- Returns:
- an Object representing the array that has been read from this section of the document.
-
gotNull
Deprecated.Called when reading a BSON field that exists but has a null value.- Parameters:
name- the name of the field- See Also:
-
gotUndefined
Deprecated.Called when reading a field with aBsonType.UNDEFINEDvalue.- Parameters:
name- the name of the field- See Also:
-
gotMinKey
Deprecated.Called when reading a field with aBsonType.MIN_KEYvalue.- Parameters:
name- the name of the field
-
gotMaxKey
Deprecated.Called when reading a field with aBsonType.MAX_KEYvalue.- Parameters:
name- the name of the field
-
gotBoolean
Deprecated.Called when reading a field with aBsonType.BOOLEANvalue.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotDouble
Deprecated.Called when reading a field with aBsonType.DOUBLEvalue.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotDecimal128
Deprecated.Called when reading a field with aBsonType.DECIMAL128value.- Parameters:
name- the field namevalue- the Decimal128 field value- Since:
- 3.4
-
gotInt
Deprecated.Called when reading a field with aBsonType.INT32value.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotLong
Deprecated.Called when reading a field with aBsonType.INT64value.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotDate
Deprecated.Called when reading a field with aBsonType.DATE_TIMEvalue.- Parameters:
name- the name of the fieldmillis- the date and time in milliseconds
-
gotString
Deprecated.Called when reading a field with aBsonType.STRINGvalue.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotSymbol
Deprecated.Called when reading a field with aBsonType.SYMBOLvalue.- Parameters:
name- the name of the fieldvalue- the field's value
-
gotRegex
Deprecated.Called when reading a field with aBsonType.REGULAR_EXPRESSIONvalue.- Parameters:
name- the name of the fieldpattern- the regex patternflags- the optional flags for the regular expression
-
gotTimestamp
Deprecated.Called when reading a field with aBsonType.TIMESTAMPvalue.- Parameters:
name- the name of the fieldtime- the time in seconds since epochincrement- an incrementing ordinal for operations within a given second
-
gotObjectId
Deprecated.Called when reading a field with aBsonType.OBJECT_IDvalue.- Parameters:
name- the name of the fieldid- the object ID
-
gotDBRef
Deprecated.Invoked whenBSONDecoderencountered aBsonType.DB_POINTERtype field in a byte sequence.- Parameters:
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
-
gotBinaryArray
Deprecated.this method is no longer called by the decoderThis method is not used.- Parameters:
name- the name of the fielddata- the field's value
-
gotBinary
Deprecated.Called when reading a field with aBsonType.BINARYvalue. Note that binary values have a subtype, which may determine how the value is processed.- Parameters:
name- the name of the fieldtype- one of the binary subtypes:BsonBinarySubTypedata- the field's value
-
gotUUID
Deprecated.Called when reading a field with aUUIDvalue. This is a binary value of subtypeBsonBinarySubType.UUID_LEGACY- Parameters:
name- the name of the fieldpart1- the first part of the UUIDpart2- the second part of the UUID
-
gotCode
Deprecated.Called when reading a field with aBsonType.JAVASCRIPTvalue.- Parameters:
name- the name of the fieldcode- the JavaScript code
-
gotCodeWScope
Deprecated.Called when reading a field with aBsonType.JAVASCRIPT_WITH_SCOPEvalue.- Parameters:
name- the name of the fieldcode- the JavaScript codescope- a document representing the scope for the code
-