public static TcpConnectionManager getConnectionPool(EndPoint from, EndPoint to) { String key = from + ":" + to; TcpConnectionManager cp = poolTable_.get(key); if (cp == null) { lock_.lock(); try { cp = poolTable_.get(key); if (cp == null) { cp = new TcpConnectionManager( MessagingConfig.getConnectionPoolInitialSize(), MessagingConfig.getConnectionPoolGrowthFactor(), MessagingConfig.getConnectionPoolMaxSize(), from, to); poolTable_.put(key, cp); } } finally { lock_.unlock(); } } return cp; }
public IVerbHandler getVerbHandler(String type) { IVerbHandler handler = (IVerbHandler) verbHandlers_.get(type); return handler; }
private void checkForReservedVerb(String type) { if (reservedVerbs_.get(type) != null && verbHandlers_.get(type) != null) { throw new IllegalArgumentException(type + " is a reserved verb handler. Scram!"); } }