public void registerHandler ( HttpServiceBindingDescriptor serviceBindingDescriptor ) { for ( ProtocolBinding protocolBinding : protocolBindingRegistry . getProtocolBindings ( ) ) { if ( protocolBinding . getProtocol ( ) == serviceBindingDescriptor . getServiceProtocol ( ) ) { String contextPath = protocolBinding . getContextRoot ( ) + serviceBindingDescriptor . getServiceContextPath ( ) ; JettyHandlerSpecification handlerSpec = handlerSpecificationMap . get ( contextPath ) ; if ( handlerSpec == null ) { handlerSpec = new JettyHandlerSpecification ( protocolBinding . getContextRoot ( ) , protocolBinding . getProtocol ( ) , serviceBindingDescriptor . getServiceContextPath ( ) ) ; handlerSpecificationMap . put ( contextPath , handlerSpec ) ; } if ( protocolBinding . getIdentityTokenResolver ( ) != null ) { handlerSpec . addServiceVersionToTokenResolverEntry ( serviceBindingDescriptor . getServiceVersion ( ) , protocolBinding . getIdentityTokenResolver ( ) ) ; } } } commandProcessorFactory . getCommandProcessor ( serviceBindingDescriptor . getServiceProtocol ( ) ) . bind ( serviceBindingDescriptor ) ; }
This method adds the service binding descriptor and all the appropriate protocol binding combos into the handlerSpecMap before binding the serviceBindingDescriptor to the appropriate command processor