Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Java SE 1.7でタイマーイベントを実装する方法を探していますが、このアプリケーションをAndroidに移植する予定があるため、Swingタイマーを使用したくありません。
バックグラウンド
セッションがタイムアウトしたときにイベントを生成するLoginSessionクラスを作成しています。このイベントは、SessionManagerクラスによって処理される必要があります。
これは十分に一般的な要件だと思います。これには単純な組み込みのサポートがあると思いますが、見つからないようです。
シンプルな組み込みのサポートがあります。Timer.schedule()を使用します。