Class ChangesetClosedException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ChangesetClosedException
    extends OsmTransferException
    A ChangesetClosedException is thrown if the server replies with a HTTP return code 409 (Conflict) with the error header ERROR_HEADER_PATTERN. Depending on the context the exception is thrown in we have to react differently.
    • if it is thrown when we try to update a changeset, the changeset was most likely closed before, either explicitly by the user or because of a timeout
    • if it is thrown when we try to upload data to the changeset, the changeset was most likely closed because we reached the servers capability limit for the size of a changeset.
    See Also:
    Serialized Form
    • Constructor Detail

      • ChangesetClosedException

        public ChangesetClosedException​(java.lang.String errorHeader)
        Creates the exception with the given errorHeader
        Parameters:
        errorHeader - the error header
      • ChangesetClosedException

        public ChangesetClosedException​(java.lang.String errorHeader,
                                        ChangesetClosedException.Source source)
        Creates the exception with the given error header and source.
        Parameters:
        errorHeader - the error header
        source - the source for the exception
      • ChangesetClosedException

        public ChangesetClosedException​(java.lang.String errorHeader,
                                        ChangesetClosedException.Source source,
                                        java.lang.Throwable cause)
        Creates the exception with the given error header, source and cause.
        Parameters:
        errorHeader - the error header
        source - the source for the exception
        cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). A null value is permitted, and indicates that the cause is nonexistent or unknown.
        Since:
        13207
      • ChangesetClosedException

        public ChangesetClosedException​(long changesetId,
                                        java.time.Instant closedOn,
                                        ChangesetClosedException.Source source)
        Creates the exception
        Parameters:
        changesetId - the id if the closed changeset
        closedOn - the date the changeset was closed on
        source - the source for the exception
    • Method Detail

      • parseErrorHeader

        protected final void parseErrorHeader​(java.lang.String errorHeader)
      • getChangesetId

        public long getChangesetId()
        Replies the id of the changeset which was closed
        Returns:
        the id of the changeset which was closed
      • getClosedOn

        public java.time.Instant getClosedOn()
        Replies the date the changeset was closed
        Returns:
        the date the changeset was closed. May be null if the date isn't known.