/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. Can be a serialized {@link QName}. Can also * include the operation name e.g. "OrderManagementService.createOrder". * @return The invoker instance. */ public Invoker newInvoker(String serviceName) { return newInvoker(createQName(serviceName)); }
/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. Can be a serialized {@link QName}. Can also * include the operation name e.g. "OrderManagementService.createOrder". * @return The invoker instance. */ public Invoker newInvoker(String serviceName) { return newInvoker(createQName(serviceName)); }
/** * Replaces an existing service registration (e.g. reference binding) with a test handler using * the same contract as the existing service provider. If multiple services are registered with * the specified name, the first one found is used. Generally speaking, it's not a good idea * to use this method if you have multiple services registered with the same name. In that * situation, use the removeService() and registerService() methods instead. * @param name name of the service to replace * @param handler implementation to use as the service provider * @throws SwitchYardException if a service with the specified name does not exist */ public void replaceService(String name, ExchangeHandler handler) throws SwitchYardException { replaceService(createQName(name), handler); }
/** * Replaces an existing service registration (e.g. reference binding) with a test handler using * the same contract as the existing service provider. If multiple services are registered with * the specified name, the first one found is used. Generally speaking, it's not a good idea * to use this method if you have multiple services registered with the same name. In that * situation, use the removeService() and registerService() methods instead. * @param name name of the service to replace * @return mock service handler representing the service provider * @throws SwitchYardException if a service with the specified name does not exist */ public MockHandler replaceService(String name) throws SwitchYardException { return replaceService(createQName(name)); }
/** * Removes all service providers from the domain with the specified name. * @param serviceName local part of a service QName */ public void removeService(String serviceName) { removeService(createQName(serviceName)); }
/** * Replaces an existing service registration (e.g. reference binding) with a test handler using * the same contract as the existing service provider. If multiple services are registered with * the specified name, the first one found is used. Generally speaking, it's not a good idea * to use this method if you have multiple services registered with the same name. In that * situation, use the removeService() and registerService() methods instead. * @param name name of the service to replace * @return mock service handler representing the service provider * @throws SwitchYardException if a service with the specified name does not exist */ public MockHandler replaceService(String name) throws SwitchYardException { return replaceService(createQName(name)); }
/** * Removes all service providers from the domain with the specified name. * @param serviceName local part of a service QName */ public void removeService(String serviceName) { removeService(createQName(serviceName)); }
/** * Replaces an existing service registration (e.g. reference binding) with a test handler using * the same contract as the existing service provider. If multiple services are registered with * the specified name, the first one found is used. Generally speaking, it's not a good idea * to use this method if you have multiple services registered with the same name. In that * situation, use the removeService() and registerService() methods instead. * @param name name of the service to replace * @param handler implementation to use as the service provider * @throws SwitchYardException if a service with the specified name does not exist */ public void replaceService(String name, ExchangeHandler handler) throws SwitchYardException { replaceService(createQName(name), handler); }
/** * Register an IN_OUT Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. * @param metadata Service interface. */ public void registerInOutService(String serviceName, ExchangeHandler serviceHandler, ServiceInterface metadata) { getServiceDomain().registerService(createQName(serviceName), metadata, serviceHandler); }
/** * Register an IN_OUT Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. * @param metadata Service interface. */ public void registerInOutService(String serviceName, ExchangeHandler serviceHandler, ServiceInterface metadata) { getServiceDomain().registerService(createQName(serviceName), metadata, serviceHandler); }
/** * Register an IN_ONLY Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. */ public void registerInOnlyService(String serviceName, ExchangeHandler serviceHandler) { getServiceDomain().registerService(createQName(serviceName), new InOnlyService(), serviceHandler); }
/** * Register an IN_OUT Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. */ public void registerInOutService(String serviceName, ExchangeHandler serviceHandler) { getServiceDomain().registerService(createQName(serviceName), new InOutService(), serviceHandler); }
/** * Register an IN_OUT Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. */ public void registerInOutService(String serviceName, ExchangeHandler serviceHandler) { getServiceDomain().registerService(createQName(serviceName), new InOutService(), serviceHandler); }
/** * Register an IN_ONLY Service. * * @param serviceName The Service name. * @param serviceHandler The service handler. */ public void registerInOnlyService(String serviceName, ExchangeHandler serviceHandler) { getServiceDomain().registerService(createQName(serviceName), new InOnlyService(), serviceHandler); }
/** * Register an IN_OUT Service. * <p/> * Registers a {@link MockHandler} as the service handler. * * @param serviceName The Service name. * @return The {@link MockHandler} service handler. */ public MockHandler registerInOutService(String serviceName) { MockHandler handler = new MockHandler(); getServiceDomain().registerService(createQName(serviceName), new InOutService(), handler); return handler; }
/** * Register an IN_ONLY Service. * <p/> * Registers a {@link MockHandler} as the fault service handler. * * @param serviceName The Service name. * @return The {@link MockHandler} service fault handler. */ public MockHandler registerInOnlyService(String serviceName) { MockHandler handler = new MockHandler(); getServiceDomain().registerService(createQName(serviceName), new InOnlyService(), handler); return handler; }
/** * Register an IN_ONLY Service. * <p/> * Registers a {@link MockHandler} as the fault service handler. * * @param serviceName The Service name. * @return The {@link MockHandler} service fault handler. */ public MockHandler registerInOnlyService(String serviceName) { MockHandler handler = new MockHandler(); getServiceDomain().registerService(createQName(serviceName), new InOnlyService(), handler); return handler; }
/** * Register an IN_OUT Service. * <p/> * Registers a {@link MockHandler} as the service handler. * * @param serviceName The Service name. * @return The {@link MockHandler} service handler. */ public MockHandler registerInOutService(String serviceName) { MockHandler handler = new MockHandler(); getServiceDomain().registerService(createQName(serviceName), new InOutService(), handler); return handler; }