Looking over recent additions to Google's Guava Libraries Release 10 I noticed the addition of EventBus. This is a lightweight implementation of a publish-subscribe style messaging system. This is similar to the publish-subscribe model provided by JMS, however the messages remain within the application rather than being broadcast externally. EventBus allows you to create streams within your progra
この記事は Java Advent Calendar 2011 の10日目です。wikiばかりで全くblogを書かないので企画の力に頼らせていただきました! 昨日の記事 << | >>明日の記事 今日はGoogleのJavaユーティリティライブラリであるGuava Librariesの最新版 10.0.1 で、新たにパッケージごと追加されたAPIであるEventBusについて紹介します。このAPIはJavaDocに@Betaアノテーションが付いており、ベータ機能であるため、将来的に内容が変更される可能性があります。 EventBusって? レイヤー分割されたコンポーネントで構成されたシステムでは、上位層から下位層を呼び出す場合はメソッドを直接呼出し、下位層から上位層を呼び出す場合は相互依存を避けるためイベント通知の機構(publish-subscribeモデル、コールバック)を利用すること
I found inconvenient that checkNotNull() precondition in guava is not marked with @Nonull annotation. Consider following example: State(Set<Model> models, Set<Variation> variations) { this.models = checkNotNull(models); this.variations = checkNotNull(variations); if (this.variations == null) { throw new IllegalArgumentException(); } this.engine = createEngine(); } So IDE could not found that varia
This post is going to cover using the Guava EventBus to publish changes to a directory or sub-directories detected by the Java 7 WatchService. The Guava EventBus is a great way to add publish/subscribe communication to an application. The WatchService, new in the Java 7 java.nio.file package, is used to monitor a directory for changes. Since the EventBus and WatchService have been covered in previ
Kristoffer SjogrenSeptember 2nd, 2011Last Updated: October 21st, 2012 I want code to be simple-n-short, on-point and easy to read. Unnecessary complexity distract and obscure understanding of what is really going on and can be a real killer for productivity. You know, tangled for-loops and indexes to track, if/else and switch cases, null/validation checks, converting/copying/deleting/sorting colle
いつのまにやら、google-collectionsがguavaに統合されていた。現時点でのバージョンはr06。guavaはGoogleの多くのJavaベースのプロジェクトで使用されているjava core libraryとのこと。 パッケージ名を見れば大体の機能について想像がつく。 com.google.common.annotations com.google.common.base com.google.common.collect com.google.common.io com.google.common.net com.google.common.primitives com.google.common.util.concurrent 見てすぐ気付くのはcommons-langやcommons-collectionsなどcommons系と機能が重複しているということ。違いといえ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く