/** * @param location the path of the service */ public TransportServiceNotFoundException(String location) { super(MessageFactory.createStaticMessage(location)); }
/** * @param location the path of the service * @param cause the exception that cause this exception to be thrown */ public TransportServiceNotFoundException(String location, Throwable cause) { super(MessageFactory.createStaticMessage(location), cause); } }
public JsonSchemaValidationException(String validationError, String invalidJson) { super(MessageFactory.createStaticMessage(validationError)); this.invalidJson = invalidJson; }
public JsonSchemaValidationException(String validationError, String invalidJson, Exception exception) { super(MessageFactory.createStaticMessage(validationError), exception); this.invalidJson = invalidJson; }
@Override public void validate(Component component) throws FlowConstructInvalidException { if (!(component instanceof JavaComponent)) { throw new FlowConstructInvalidException( MessageFactory.createStaticMessage("SimpleService can only expose instances of JAX-WS annotated JavaComponent instances. You provided a: " + component.getClass().getName())); } }
public void initialise() throws InitialisationException { if ((objectClassName == null) || (objectClass == null)) { throw new InitialisationException( MessageFactory.createStaticMessage("Object factory has not been initialized."), this); } disposed = false; }
public void setLifecycleManager(LifecycleManager manager) { if (!(manager instanceof MuleContextLifecycleManager)) { Message msg = MessageFactory.createStaticMessage( "lifecycle manager for MuleContext must be a MuleContextLifecycleManager"); throw new MuleRuntimeException(msg); } lifecycleManager = (MuleContextLifecycleManager) manager; }
public PartitionedMessageSequence(MessageSequence<Q> seq, int groupSize) { if (groupSize <= 1) { throw new MuleRuntimeException(MessageFactory.createStaticMessage("group size must be greater than 1")); } this.delegate = seq; this.groupSize = groupSize; }
@Override public void initialise() throws InitialisationException { if (bus == null) { throw new InitialisationException( MessageFactory.createStaticMessage("No CXF bus instance, this component has not been initialized properly."), this); } }
protected void setMessage(String message) { initialise(); this.message = message; if (i18nMessage == null) { i18nMessage = MessageFactory.createStaticMessage(message); } }
@Override public void validate(Component component) throws FlowConstructInvalidException { if (!(component instanceof JavaComponent)) { throw new FlowConstructInvalidException( MessageFactory.createStaticMessage("SimpleService can only expose instances of JAX-RS annotated JavaComponent instances. You provided a: " + component.getClass().getName())); } }
private Exception wrapInDispatchException(MuleEvent event, int routeIndex, MessageProcessor route, Exception e) { return new DispatchException(MessageFactory.createStaticMessage(String.format( "route number %d failed to be executed", routeIndex)), event, route, e); }
public Object borrowObject() throws Exception { if (pool != null) { return pool.borrowObject(); } else { throw new InitialisationException( MessageFactory.createStaticMessage("Object pool has not been initialized."), this); } }
private MuleException handledException(OperationContext operationContext, Exception e) { Throwable root = ExceptionUtils.getRootCause(e); if (root == null) { root = e; } return new MessagingException(createStaticMessage(root.getMessage()), ((OperationContextAdapter) operationContext).getEvent(), root, this); }
protected void checkDisposed() throws RegistrationException { if (getLifecycleManager().isPhaseComplete(Disposable.PHASE_NAME)) { throw new RegistrationException(MessageFactory.createStaticMessage("Cannot register objects on the registry as the context is disposed")); } }
private void validateMessageSource() throws FlowConstructInvalidException { if ((messageSource instanceof InboundEndpoint) && (!((InboundEndpoint) messageSource).getExchangePattern().equals( MessageExchangePattern.REQUEST_RESPONSE))) { throw new FlowConstructInvalidException( MessageFactory.createStaticMessage("Validator only works with a request-response inbound endpoint."), this); } }
private void validateExpression(String expression) throws FlowConstructInvalidException { if (!muleContext.getExpressionManager().isExpression(expression)) { throw new FlowConstructInvalidException( MessageFactory.createStaticMessage("Invalid expression in Validator: " + expression), this); } }
private void validateOutboundEndpoint() throws FlowConstructInvalidException { if ((hasErrorExpression()) && (!outboundEndpoint.getExchangePattern().equals(MessageExchangePattern.REQUEST_RESPONSE))) { throw new FlowConstructInvalidException( MessageFactory.createStaticMessage("Validator with an error expression only works with a request-response outbound endpoint."), this); } }
public WebServiceSecurityException(MuleEvent event, Throwable cause, MessageProcessor failingMessageProcessor) { super(MessageFactory.createStaticMessage( "Security exception occurred invoking web service\nEndpoint = " + event.getMessageSourceURI() + "\nSecurity provider(s) = " + event.getMuleContext().getSecurityManager().getProviders() + "\nEvent = " + event), event, cause, failingMessageProcessor); } }
/** * The method will be called, when file transferring was canceled */ @Override public void cancelled() { super.cancelled(); close(); responseStatusCallback.responseSendFailure(new DefaultMuleException(createStaticMessage("HTTP response sending task was cancelled"))); resume(); }