Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all the things #66

Merged
merged 66 commits into from
Oct 12, 2017
Merged

Refactor all the things #66

merged 66 commits into from
Oct 12, 2017

Conversation

rokob
Copy link
Contributor

@rokob rokob commented Oct 12, 2017

Before pushing the alpha release out it makes sense to have the code living on master. So this PR is to merge all the work from sdk-refactor onto master.

basoko and others added 30 commits September 18, 2017 17:37
…dd google checkstyle rules.

Ideas behind this new set of classes are:
  * Fluent API through Builders included in each class.
  * Immutable classes.

An example of use of how to build each different payload the factory
class under the test's util package would be a good starting point.
Add a new set of classes that represents the Rollbar's API and also a…
This new version of the notifier has the following features:
* Same API like the previous version for sending messages. Methods
  like log, critical, error...etc has the same signature.
* Introduced new APIs to gather external data and allow future
  integrations.
* Library managed instance.
* New pipeline for data processing with the following steps.
* Uncaught exception handler with delegation to previously set handler.
** Gather external data through the new interfaces.
** Filter process with two steps for preTransform and preSend steps.
** Transformation of the payload before sending.
** UUID generator.
** Fingerprint generator.
** Send payload.
At this point the example is part of the build, but this is something
that could be changed later to use the published dependency.
The idea is to have senders that can notify to a
set of listeners the result of a payload send.

Changes introduced are:
* Rename callback to listener to be more representative.
* The listener methods now receive also the payload to
  have a reference to the payload that caused the result.
* Remove the option from config because now this listeners
  are set in the sender and the notifier should not know
  anything regarding them, that ends up being decoupled.

Move to an approach where senders can notify of results through
listeners instead of a callback executed every time an event is sent.

Also, modified the previous sender callback interface to a sender
listener name, and added the payload send to the listener's methods.
This abstract sender is added to allow code reuse regarding
the notifications to listener handling.
Also, this class allows simplified implementations of senders.
The senders probably will be handling external resources,
so through this change now the senders have a method that allow implementations
to free them up.
Changes done:
* Sender interface now has a method to retrieve the sender's
  listeners. This helps with delegation.
* Make JsonSerializable inherits from Serializable to allow
  serializing the payloads to disk.
* The different data structures of our API should contain
  objects that are Serializable in order to use the
  disk queue, if not it will fail serializing/deserializing.
* Add a sender that is buffered by a queue and executes in
  another thread the sending of the payloads.
* Add a disk queue.
basoko and others added 27 commits October 4, 2017 09:35
…on the singleton instance so all of the instance methods can be called without a static alias
Add publishing with maven-publish plugin and signing
@rokob rokob merged commit 84461cb into master Oct 12, 2017
@rokob rokob deleted the sdk-refactor branch December 18, 2018 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants