Package org.bson

Class EmptyBSONCallback

  • All Implemented Interfaces:
    BSONCallback
    Direct Known Subclasses:
    LazyBSONCallback

    @Deprecated(since="2022-10-31")
    public class EmptyBSONCallback
    extends java.lang.Object
    implements BSONCallback
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Convenience implementation of BSONCallback that throws UnsupportedOperationException for all methods.
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyBSONCallback()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.Object arrayDone()
      Deprecated.
      Called the end of the array, and returns the completed array.
      void arrayStart()
      Deprecated.
      Signals the start of a BSON array.
      void arrayStart​(java.lang.String name)
      Deprecated.
      Signals the start of a BSON array, with its field name.
      BSONCallback createBSONCallback()
      Deprecated.
      Factory method for BSONCallbacks.
      java.lang.Object get()
      Deprecated.
      Returns the finished top-level Document.
      void gotBinary​(java.lang.String name, byte type, byte[] data)
      Deprecated.
      Called when reading a field with a BsonType.BINARY value.
      void gotBinaryArray​(java.lang.String name, byte[] data)
      Deprecated.
      void gotBoolean​(java.lang.String name, boolean value)
      Deprecated.
      Called when reading a field with a BsonType.BOOLEAN value.
      void gotCode​(java.lang.String name, java.lang.String code)
      Deprecated.
      Called when reading a field with a BsonType.JAVASCRIPT value.
      void gotCodeWScope​(java.lang.String name, java.lang.String code, java.lang.Object scope)
      Deprecated.
      Called when reading a field with a BsonType.JAVASCRIPT_WITH_SCOPE value.
      void gotDate​(java.lang.String name, long millis)
      Deprecated.
      Called when reading a field with a BsonType.DATE_TIME value.
      void gotDBRef​(java.lang.String name, java.lang.String namespace, ObjectId id)
      Deprecated.
      Invoked when BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence.
      void gotDecimal128​(java.lang.String name, Decimal128 value)
      Deprecated.
      Called when reading a field with a BsonType.DECIMAL128 value.
      void gotDouble​(java.lang.String name, double value)
      Deprecated.
      Called when reading a field with a BsonType.DOUBLE value.
      void gotInt​(java.lang.String name, int value)
      Deprecated.
      Called when reading a field with a BsonType.INT32 value.
      void gotLong​(java.lang.String name, long value)
      Deprecated.
      Called when reading a field with a BsonType.INT64 value.
      void gotMaxKey​(java.lang.String name)
      Deprecated.
      Called when reading a field with a BsonType.MAX_KEY value.
      void gotMinKey​(java.lang.String name)
      Deprecated.
      Called when reading a field with a BsonType.MIN_KEY value.
      void gotNull​(java.lang.String name)
      Deprecated.
      Called when reading a BSON field that exists but has a null value.
      void gotObjectId​(java.lang.String name, ObjectId id)
      Deprecated.
      Called when reading a field with a BsonType.OBJECT_ID value.
      void gotRegex​(java.lang.String name, java.lang.String pattern, java.lang.String flags)
      Deprecated.
      Called when reading a field with a BsonType.REGULAR_EXPRESSION value.
      void gotString​(java.lang.String name, java.lang.String value)
      Deprecated.
      Called when reading a field with a BsonType.STRING value.
      void gotSymbol​(java.lang.String name, java.lang.String value)
      Deprecated.
      Called when reading a field with a BsonType.SYMBOL value.
      void gotTimestamp​(java.lang.String name, int time, int increment)
      Deprecated.
      Called when reading a field with a BsonType.TIMESTAMP value.
      void gotUndefined​(java.lang.String name)
      Deprecated.
      Called when reading a field with a BsonType.UNDEFINED value.
      void gotUUID​(java.lang.String name, long part1, long part2)
      Deprecated.
      Called when reading a field with a UUID value.
      java.lang.Object objectDone()
      Deprecated.
      Called at the end of the document/array, and returns this object.
      void objectStart()
      Deprecated.
      Signals the start of a BSON document, which usually maps onto some Java object.
      void objectStart​(java.lang.String name)
      Deprecated.
      Signals the start of a BSON document, which usually maps onto some Java object.
      void reset()
      Deprecated.
      Resets the callback, clearing all state.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyBSONCallback

        public EmptyBSONCallback()
        Deprecated.
    • Method Detail

      • objectStart

        public void objectStart()
        Deprecated.
        Description copied from interface: BSONCallback
        Signals the start of a BSON document, which usually maps onto some Java object.
        Specified by:
        objectStart in interface BSONCallback
      • objectStart

        public void objectStart​(java.lang.String name)
        Deprecated.
        Description copied from interface: BSONCallback
        Signals the start of a BSON document, which usually maps onto some Java object.
        Specified by:
        objectStart in interface BSONCallback
        Parameters:
        name - the field name of the document.
      • objectDone

        public java.lang.Object objectDone()
        Deprecated.
        Description copied from interface: BSONCallback
        Called at the end of the document/array, and returns this object.
        Specified by:
        objectDone in interface BSONCallback
        Returns:
        the Object that has been read from this section of the document.
      • reset

        public void reset()
        Deprecated.
        Description copied from interface: BSONCallback
        Resets the callback, clearing all state.
        Specified by:
        reset in interface BSONCallback
      • get

        public java.lang.Object get()
        Deprecated.
        Description copied from interface: BSONCallback
        Returns the finished top-level Document.
        Specified by:
        get in interface BSONCallback
        Returns:
        the top level document read from the database.
      • arrayStart

        public void arrayStart()
        Deprecated.
        Description copied from interface: BSONCallback
        Signals the start of a BSON array.
        Specified by:
        arrayStart in interface BSONCallback
      • arrayStart

        public void arrayStart​(java.lang.String name)
        Deprecated.
        Description copied from interface: BSONCallback
        Signals the start of a BSON array, with its field name.
        Specified by:
        arrayStart in interface BSONCallback
        Parameters:
        name - the name of this array field
      • arrayDone

        public java.lang.Object arrayDone()
        Deprecated.
        Description copied from interface: BSONCallback
        Called the end of the array, and returns the completed array.
        Specified by:
        arrayDone in interface BSONCallback
        Returns:
        an Object representing the array that has been read from this section of the document.
      • gotNull

        public void gotNull​(java.lang.String name)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a BSON field that exists but has a null value.
        Specified by:
        gotNull in interface BSONCallback
        Parameters:
        name - the name of the field
        See Also:
        BsonType.NULL
      • gotMinKey

        public void gotMinKey​(java.lang.String name)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.MIN_KEY value.
        Specified by:
        gotMinKey in interface BSONCallback
        Parameters:
        name - the name of the field
      • gotMaxKey

        public void gotMaxKey​(java.lang.String name)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.MAX_KEY value.
        Specified by:
        gotMaxKey in interface BSONCallback
        Parameters:
        name - the name of the field
      • gotBoolean

        public void gotBoolean​(java.lang.String name,
                               boolean value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.BOOLEAN value.
        Specified by:
        gotBoolean in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotDouble

        public void gotDouble​(java.lang.String name,
                              double value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.DOUBLE value.
        Specified by:
        gotDouble in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotInt

        public void gotInt​(java.lang.String name,
                           int value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.INT32 value.
        Specified by:
        gotInt in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotLong

        public void gotLong​(java.lang.String name,
                            long value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.INT64 value.
        Specified by:
        gotLong in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotDecimal128

        public void gotDecimal128​(java.lang.String name,
                                  Decimal128 value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.DECIMAL128 value.
        Specified by:
        gotDecimal128 in interface BSONCallback
        Parameters:
        name - the field name
        value - the Decimal128 field value
      • gotDate

        public void gotDate​(java.lang.String name,
                            long millis)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.DATE_TIME value.
        Specified by:
        gotDate in interface BSONCallback
        Parameters:
        name - the name of the field
        millis - the date and time in milliseconds
      • gotString

        public void gotString​(java.lang.String name,
                              java.lang.String value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.STRING value.
        Specified by:
        gotString in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotSymbol

        public void gotSymbol​(java.lang.String name,
                              java.lang.String value)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.SYMBOL value.
        Specified by:
        gotSymbol in interface BSONCallback
        Parameters:
        name - the name of the field
        value - the field's value
      • gotRegex

        public void gotRegex​(java.lang.String name,
                             java.lang.String pattern,
                             java.lang.String flags)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.REGULAR_EXPRESSION value.
        Specified by:
        gotRegex in interface BSONCallback
        Parameters:
        name - the name of the field
        pattern - the regex pattern
        flags - the optional flags for the regular expression
      • gotTimestamp

        public void gotTimestamp​(java.lang.String name,
                                 int time,
                                 int increment)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.TIMESTAMP value.
        Specified by:
        gotTimestamp in interface BSONCallback
        Parameters:
        name - the name of the field
        time - the time in seconds since epoch
        increment - an incrementing ordinal for operations within a given second
      • gotObjectId

        public void gotObjectId​(java.lang.String name,
                                ObjectId id)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.OBJECT_ID value.
        Specified by:
        gotObjectId in interface BSONCallback
        Parameters:
        name - the name of the field
        id - the object ID
      • gotDBRef

        public void gotDBRef​(java.lang.String name,
                             java.lang.String namespace,
                             ObjectId id)
        Deprecated.
        Description copied from interface: BSONCallback
        Invoked when BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence.
        Specified by:
        gotDBRef in interface BSONCallback
        Parameters:
        name - the name of the field
        namespace - the namespace to which reference is pointing to
        id - the if of the object to which reference is pointing to
      • gotBinaryArray

        @Deprecated
        public void gotBinaryArray​(java.lang.String name,
                                   byte[] data)
        Deprecated.
        Description copied from interface: BSONCallback
        This method is not used.
        Specified by:
        gotBinaryArray in interface BSONCallback
        Parameters:
        name - the name of the field
        data - the field's value
      • gotBinary

        public void gotBinary​(java.lang.String name,
                              byte type,
                              byte[] data)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.BINARY value. Note that binary values have a subtype, which may determine how the value is processed.
        Specified by:
        gotBinary in interface BSONCallback
        Parameters:
        name - the name of the field
        type - one of the binary subtypes: BsonBinarySubType
        data - the field's value
      • gotUUID

        public void gotUUID​(java.lang.String name,
                            long part1,
                            long part2)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a UUID value. This is a binary value of subtype BsonBinarySubType.UUID_LEGACY
        Specified by:
        gotUUID in interface BSONCallback
        Parameters:
        name - the name of the field
        part1 - the first part of the UUID
        part2 - the second part of the UUID
      • gotCode

        public void gotCode​(java.lang.String name,
                            java.lang.String code)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.JAVASCRIPT value.
        Specified by:
        gotCode in interface BSONCallback
        Parameters:
        name - the name of the field
        code - the JavaScript code
      • gotCodeWScope

        public void gotCodeWScope​(java.lang.String name,
                                  java.lang.String code,
                                  java.lang.Object scope)
        Deprecated.
        Description copied from interface: BSONCallback
        Called when reading a field with a BsonType.JAVASCRIPT_WITH_SCOPE value.
        Specified by:
        gotCodeWScope in interface BSONCallback
        Parameters:
        name - the name of the field
        code - the JavaScript code
        scope - a document representing the scope for the code