Ok, I think I get now why you use the volatile variable and this synchronized stuff. Are you trying to minimize the cost of loading the KeyPair and trying to load it only the first time the filter is invoked? If that is the case, I'd recommend one of the following two approaches:
* Move the load KeyPair logic to the constructor (you have all you need there). This way you'll have the KeyPair already loaded and you won't have to deal with synchronization.
* If you prefer to defer the KeyPair loading until the filter is invoked, you'd better inject a `Supplier<KeyPair>`, and use it to load the keyPair. You can configure it in Guice to be synchronized and memoized, so it is thread safe and it is only loaded once. (See [Guava Suppliers](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Suppliers.html) utility class. Something like: `Suppliers.memoize(Suppliers.synchronized(your-supplier-to-load-the-keypair))`.