+ if (this.session != null) {
+ try {
+ this.session.close();
+ } catch (final Exception e) {
+ LOG.warn("Error closing session", e);
+ }
+ }
+ }
+
+ BGPSessionImpl.State getState() {
+ return getSession().getState();
+ }
+
+ BGPSessionImpl getSession() {
+ Assert.assertEquals("Session up", true, Uninterruptibles.awaitUninterruptibly(this.sessionLatch, 10, TimeUnit.SECONDS));
+ return (BGPSessionImpl) this.session;