@Test public void testCreateName() throws Exception { AdapterSchemeJndiNameCreator creator = new AdapterSchemeJndiNameCreator(); String s = creator.createName(new NullConnection()); assertTrue(s.startsWith("adapter:comp/env/")); }
@Override public String createName(Object object) throws AdapterNamingException { if(object instanceof AdaptrisConnection) return STATIC_NAME + ((AdaptrisConnection) object).getUniqueId(); throw new AdapterNamingException("Object of class '" + object.getClass().getName() + "' is not an AdaptrisConnection, cannot create a JNDI name."); }
AdapterSchemeJndiNameCreator implements JndiNameCreator { @Override public String createName(Object object) throws AdapterNamingException { if(object instanceof AdaptrisConnection) return STATIC_NAME + ((AdaptrisConnection) object).getUniqueId(); throw new AdapterNamingException("Object of class '" + object.getClass().getName() + "' is not an AdaptrisConnection, cannot create a JNDI name."); } }
AdapterSchemeJndiNameCreator implements JndiNameCreator { @Override public String createName(Object object) throws AdapterNamingException { if(object instanceof AdaptrisConnection) return STATIC_NAME + ((AdaptrisConnection) object).getUniqueId(); throw new AdapterNamingException("Object of class '" + object.getClass().getName() + "' is not an AdaptrisConnection, cannot create a JNDI name."); }  }
AdapterSchemeJndiNameCreator implements JndiNameCreator { @Override public String createName(Object object) throws AdapterNamingException { if(object instanceof AdaptrisConnection) return STATIC_NAME + ((AdaptrisConnection) object).getUniqueId(); throw new AdapterNamingException("Object of class '" + object.getClass().getName() + "' is not an AdaptrisConnection, cannot create a JNDI name."); }  @Override String createName(Object object); }
AdapterSchemeJndiNameCreator implements JndiNameCreator { @Override public String createName(Object object) throws AdapterNamingException { if(object instanceof AdaptrisConnection) return STATIC_NAME + ((AdaptrisConnection) object).getUniqueId(); throw new AdapterNamingException("Object of class '" + object.getClass().getName() + "' is not an AdaptrisConnection, cannot create a JNDI name."); }  @Override String createName(Object object);  }