public class EmptyBSONCallback extends Object implements BSONCallback
UnsupportedOperationException for all methods.| Constructor and Description |
|---|
EmptyBSONCallback() |
| 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 binary value.
|
void |
gotBinaryArray(String name,
byte[] data)
Deprecated.
|
void |
gotBoolean(String name,
boolean v)
Called when reading a field with a Boolean value.
|
void |
gotCode(String name,
String code)
Called when reading a field with a JavaScript value.
|
void |
gotCodeWScope(String name,
String code,
Object scope)
Called when reading a field with a JavaScript with Scope value.
|
void |
gotDate(String name,
long millis)
Called when reading a field with a DateTime value.
|
void |
gotDBRef(String name,
String ns,
ObjectId id)
Invoked when
BSONDecoder encountered a DBPointer(0x0c) type field in a byte sequence. |
void |
gotDouble(String name,
double v)
Called when reading a field with a Double value.
|
void |
gotInt(String name,
int v)
Called when reading a field with an Int32 value.
|
void |
gotLong(String name,
long v)
Called when reading a field with an Int64 value.
|
void |
gotMaxKey(String name)
Called when reading a field with a MaxKey value.
|
void |
gotMinKey(String name)
Called when reading a field with a MinKey value.
|
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 an ObjectID value.
|
void |
gotRegex(String name,
String pattern,
String flags)
Called when reading a field with a Regex value.
|
void |
gotString(String name,
String v)
Called when reading a field with a String value.
|
void |
gotSymbol(String name,
String v)
Called when reading a field with a Symbol value.
|
void |
gotTimestamp(String name,
int time,
int inc)
Called when reading a field with a Timestamp value.
|
void |
gotUndefined(String name)
Called when reading a field with an Undefined value.
|
void |
gotUUID(String name,
long part1,
long part2)
Called when reading a field with a
UUID value. |
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(boolean array)
Deprecated.
instead, use
arrayStart() if array is true, and objectStart() if array is false |
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.
|
public void objectStart()
BSONCallbackobjectStart in interface BSONCallbackpublic void objectStart(String name)
BSONCallbackobjectStart in interface BSONCallbackname - the field name of the document.@Deprecated public void objectStart(boolean array)
arrayStart() if array is true, and objectStart() if array is falseobjectStart in interface BSONCallbackarray - true if this object is an arraypublic Object objectDone()
BSONCallbackobjectDone in interface BSONCallbackpublic BSONCallback createBSONCallback()
BSONCallbackcreateBSONCallback in interface BSONCallbackpublic void arrayStart()
BSONCallbackarrayStart in interface BSONCallbackpublic void arrayStart(String name)
BSONCallbackarrayStart in interface BSONCallbackname - the name of this array fieldpublic Object arrayDone()
BSONCallbackarrayDone in interface BSONCallbackpublic void gotNull(String name)
BSONCallbackgotNull in interface BSONCallbackname - the name of the fieldpublic void gotUndefined(String name)
BSONCallbackgotUndefined in interface BSONCallbackname - the name of the fieldpublic void gotMinKey(String name)
BSONCallbackgotMinKey in interface BSONCallbackname - the name of the fieldpublic void gotMaxKey(String name)
BSONCallbackgotMaxKey in interface BSONCallbackname - the name of the fieldpublic void gotBoolean(String name, boolean v)
BSONCallbackgotBoolean in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotDouble(String name, double v)
BSONCallbackgotDouble in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotInt(String name, int v)
BSONCallbackgotInt in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotLong(String name, long v)
BSONCallbackgotLong in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotDate(String name, long millis)
BSONCallbackgotDate in interface BSONCallbackname - the name of the fieldmillis - the date and time in millisecondspublic void gotString(String name, String v)
BSONCallbackgotString in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotSymbol(String name, String v)
BSONCallbackgotSymbol in interface BSONCallbackname - the name of the fieldv - the field's valuepublic void gotRegex(String name, String pattern, String flags)
BSONCallbackgotRegex in interface BSONCallbackname - the name of the fieldpattern - the regex patternflags - the optional flags for the regular expressionpublic void gotTimestamp(String name, int time, int inc)
BSONCallbackgotTimestamp in interface BSONCallbackname - the name of the fieldtime - the time in seconds since epochinc - an incrementing ordinal for operations within a given secondpublic void gotObjectId(String name, ObjectId id)
BSONCallbackgotObjectId in interface BSONCallbackname - the name of the fieldid - the object IDpublic void gotDBRef(String name, String ns, ObjectId id)
BSONCallbackBSONDecoder encountered a DBPointer(0x0c) type field in a byte sequence.gotDBRef in interface BSONCallbackname - the name of the fieldns - the namespace to which reference is pointing toid - the if of the object to which reference is pointing to@Deprecated public void gotBinaryArray(String name, byte[] data)
BSONCallbackgotBinaryArray in interface BSONCallbackname - the name of the fielddata - the field's valuepublic void gotUUID(String name, long part1, long part2)
BSONCallbackUUID value. This is a binary value of subtype UuidLegacy.gotUUID in interface BSONCallbackname - the name of the fieldpart1 - the first part of the UUIDpart2 - the second part of the UUIDpublic void gotCode(String name, String code)
BSONCallbackgotCode in interface BSONCallbackname - the name of the fieldcode - the JavaScript codepublic void gotCodeWScope(String name, String code, Object scope)
BSONCallbackgotCodeWScope in interface BSONCallbackname - the name of the fieldcode - the JavaScript codescope - a document representing the scope for the codepublic void reset()
BSONCallbackreset in interface BSONCallbackpublic Object get()
BSONCallbackget in interface BSONCallbackpublic void gotBinary(String name, byte type, byte[] data)
BSONCallbackgotBinary in interface BSONCallbackname - the name of the fieldtype - one of the binary subtypesdata - the field's value