* @throws IOException when any IO related issues emerge during {@link org.glassfish.tyrus.spi.ServerContainer#start(String, int)}.
* @throws DeploymentException when any deployment related error is found; should contain list of all found issues.
*/
@Override
public void start(String rootPath, int port) throws IOException, DeploymentException {
ServerApplicationConfig configuration = new TyrusServerConfiguration((classes == null ? Collections.<Class<?>>emptySet() : classes),
dynamicallyAddedClasses, dynamicallyAddedEndpointConfigs, this.collector);
// start the underlying server
try {
// deploy all the annotated endpoints
for (Class<?> endpointClass : configuration.getAnnotatedEndpointClasses(null)) {
register(endpointClass);
}
// deploy all the programmatic endpoints
for (ServerEndpointConfig serverEndpointConfiguration : configuration.getEndpointConfigs(null)) {
if (serverEndpointConfiguration != null) {
register(serverEndpointConfiguration);
}
}