ResourcePool getSocketSet(final ConnectionType connectionType)
		throws ShutdownException {

		synchronized (m_socketSets) {
			if (m_isShutdown) {
				throw new ShutdownException("Acceptor has been shut down");
			}

			final ResourcePool original = m_socketSets.get(connectionType);

			if (original != null) {
				return original;
			}
			else {
				final ResourcePool newSocketSet = new ResourcePoolImplementation();

				newSocketSet.addListener(
					new ResourcePool.Listener() {
						public void resourceAdded(ResourcePool.Resource resource) {
							final ConnectionIdentity connection =
								((SocketWrapper)resource).getConnectionIdentity();

							getListeners(connectionType).apply(
								new ListenerSupport.Informer<Listener>() {
									public void inform(Listener l) {
										l.connectionAccepted(connectionType, connection);
									}
								});
						}

						public void resourceClosed(ResourcePool.Resource resource) {
							final ConnectionIdentity connection =
								((SocketWrapper)resource).getConnectionIdentity();

							getListeners(connectionType).apply(
								new ListenerSupport.Informer<Listener>() {
									public void inform(Listener l) {
										l.connectionClosed(connectionType, connection);
									}
								});
						}
					});

				m_socketSets.put(connectionType, newSocketSet);
				return newSocketSet;
			}
		}
	}
Get a set of accepted connections.

@param connectionType
         Identifies the set of connections to return.
@return A set of sockets, each wrapped in an {@link IdleAwareSocketWrapper}
        .
@throws ShutdownException
          If the acceptor is shutdown.
ngrinder-core/src/main/java/net/grinder/communication/Acceptor.java