org.mule.config.i18n.Message.toString()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(289)

本文整理了Java中org.mule.config.i18n.Message.toString()方法的一些代码示例,展示了Message.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.toString()方法的具体详情如下:
包路径:org.mule.config.i18n.Message
类名称:Message
方法名:toString

Message.toString介绍

暂无

代码示例

代码示例来源:origin: org.mule/mule-core

  1. public KeyedPoolMessageDispatcherFactoryAdapter(MessageDispatcherFactory factory)
  2. {
  3. super();
  4. if (factory == null)
  5. {
  6. throw new IllegalArgumentException(CoreMessages.objectIsNull("factory").toString());
  7. }
  8. this.factory = factory;
  9. }

代码示例来源:origin: org.mule.transports/mule-transport-http

  1. public void setCookieSpec(String cookieSpec)
  2. {
  3. if (!(COOKIE_SPEC_NETSCAPE.equalsIgnoreCase(cookieSpec) || COOKIE_SPEC_RFC2109.equalsIgnoreCase(cookieSpec)))
  4. {
  5. throw new IllegalArgumentException(
  6. CoreMessages.propertyHasInvalidValue("cookieSpec", cookieSpec).toString());
  7. }
  8. this.cookieSpec = cookieSpec;
  9. }

代码示例来源:origin: org.mule/mule-core

  1. public KeyedPoolMessageRequesterFactoryAdapter(MessageRequesterFactory factory)
  2. {
  3. super();
  4. if (factory == null)
  5. {
  6. throw new IllegalArgumentException(CoreMessages.objectIsNull("factory").toString());
  7. }
  8. this.factory = factory;
  9. }

代码示例来源:origin: org.mule/mule-core

  1. /**
  2. * An optional error message can be set if the invocation state is not {@link org.mule.api.model.InvocationResult.State#SUCCESSFUL}
  3. *
  4. * @param message the error message
  5. */
  6. public void setErrorMessage(String message)
  7. {
  8. if (state == State.SUCCESSFUL)
  9. {
  10. throw new IllegalStateException(CoreMessages.invocationSuccessfulCantSetError().toString());
  11. }
  12. errorMessage = message;
  13. }

代码示例来源:origin: org.mule/mule-core

  1. @Override
  2. public void setName(String newName)
  3. {
  4. if (newName == null)
  5. {
  6. throw new IllegalArgumentException(CoreMessages.objectIsNull("Connector name").toString());
  7. }
  8. if (logger.isDebugEnabled())
  9. {
  10. logger.debug("Set Connector name to: " + newName);
  11. }
  12. name = newName;
  13. }

代码示例来源:origin: org.mule/mule-core

  1. public static Properties loadProperties(InputStream is) throws IOException
  2. {
  3. if (is == null)
  4. {
  5. Message error = CoreMessages.objectIsNull("input stream");
  6. throw new IOException(error.toString());
  7. }
  8. try
  9. {
  10. Properties props = new Properties();
  11. props.load(is);
  12. return props;
  13. }
  14. finally
  15. {
  16. is.close();
  17. }
  18. }

代码示例来源:origin: org.mule/mule-core

  1. public void setErrorNoMatchingMethodsCalled(Object component, String methods)
  2. {
  3. setErrorMessage(CoreMessages.noMatchingMethodsOnObjectCalledUsingResolver(
  4. component.getClass().getName(), methods).toString());
  5. }

代码示例来源:origin: org.mule/mule-core

  1. public static Properties loadProperties(URL url) throws IOException
  2. {
  3. if (url == null)
  4. {
  5. Message error = CoreMessages.objectIsNull("url");
  6. throw new IOException(error.toString());
  7. }
  8. return loadProperties(url.openStream());
  9. }

代码示例来源:origin: org.mule/mule-core

  1. public void setErrorNoMatchingMethods(Object component, Class<?>[] args)
  2. {
  3. setErrorMessage(CoreMessages.noEntryPointFoundWithArgsUsingResolver(
  4. component.getClass().getName(), args).toString());
  5. }

代码示例来源:origin: org.mule/mule-core

  1. public void setErrorTooManyMatchingMethods(Object component, Class<?>[] argTypes, String methods)
  2. {
  3. setErrorMessage(CoreMessages.tooManyAcceptableMethodsOnObjectUsingResolverForTypes(
  4. component.getClass().getName(), argTypes, methods).toString());
  5. }

代码示例来源:origin: org.mule/mule-core

  1. protected void init()
  2. {
  3. if (monitorFrequency <= 0)
  4. {
  5. throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("monitorFrequency",
  6. new Integer(monitorFrequency)).toString());
  7. }
  8. monitors = new ConcurrentHashMap();
  9. if (scheduler == null)
  10. {
  11. this.scheduler = new ScheduledThreadPoolExecutor(1);
  12. scheduler.setThreadFactory(new DaemonThreadFactory(name + ".expiry.monitor", contextClassLoader));
  13. scheduler.scheduleWithFixedDelay(this, 0, monitorFrequency,
  14. TimeUnit.MILLISECONDS);
  15. }
  16. }

代码示例来源:origin: org.mule/mule-core

  1. private void checkNull(Scheduler postProcessedScheduler)
  2. {
  3. if (postProcessedScheduler == null)
  4. {
  5. throw new SchedulerCreationException(objectIsNull("scheduler").toString());
  6. }
  7. }

代码示例来源:origin: org.mule.modules/mule-module-ibeans

  1. public String getScheme(Method method)
  2. {
  3. InterfaceBinding router = routers.get(method.toString());
  4. if (router == null)
  5. {
  6. throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString());
  7. }
  8. return router.getEndpoint().getEndpointURI().getScheme();
  9. }

代码示例来源:origin: org.mule/mule-core

  1. /**
  2. * Will get the output stream for this type of transport. Typically this will be
  3. * called only when Streaming is being used on an outbound endpoint. If Streaming
  4. * is not supported by this transport an {@link UnsupportedOperationException} is
  5. * thrown. Note that the stream MUST release resources on close. For help doing
  6. * so, see {@link org.mule.model.streaming.CallbackOutputStream}.
  7. *
  8. * @param endpoint the endpoint that releates to this Dispatcher
  9. * @param event the current event being processed
  10. * @return the output stream to use for this request
  11. * @throws MuleException in case of any error
  12. */
  13. @Override
  14. public OutputStream getOutputStream(OutboundEndpoint endpoint, MuleEvent event) throws MuleException
  15. {
  16. throw new UnsupportedOperationException(CoreMessages.streamingNotSupported(this.getProtocol()).toString());
  17. }

代码示例来源:origin: org.mule/mule-core

  1. public void initialise() throws InitialisationException
  2. {
  3. if (name == null)
  4. {
  5. name = UUID.getUUID();
  6. }
  7. if (expirationInterval <= 0)
  8. {
  9. throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval",
  10. new Integer(expirationInterval)).toString());
  11. }
  12. if (scheduler == null)
  13. {
  14. this.scheduler = new ScheduledThreadPoolExecutor(1);
  15. scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", this.getClass().getClassLoader()));
  16. scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS);
  17. }
  18. }

代码示例来源:origin: org.mule/mule-core

  1. @Override
  2. public void initialise() throws InitialisationException
  3. {
  4. if (name == null)
  5. {
  6. name = UUID.getUUID();
  7. }
  8. if (expirationInterval <= 0)
  9. {
  10. throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval",
  11. new Integer(expirationInterval)).toString());
  12. }
  13. if (scheduler == null)
  14. {
  15. this.scheduler = new ScheduledThreadPoolExecutor(1);
  16. scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", context.getExecutionClassLoader()));
  17. scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS);
  18. }
  19. }

代码示例来源:origin: org.mule/mule-core

  1. public InvocationResult invoke(Object component, MuleEventContext context) throws Exception
  2. {
  3. if (component instanceof Callable)
  4. {
  5. Object result = ((Callable) component).onCall(context);
  6. return new InvocationResult(this, result, callableMethod);
  7. }
  8. else
  9. {
  10. InvocationResult result = new InvocationResult(this, InvocationResult.State.NOT_SUPPORTED);
  11. result.setErrorMessage(CoreMessages.objectDoesNotImplementInterface(component, Callable.class).toString());
  12. return result;
  13. }
  14. }

代码示例来源:origin: org.mule.transports/mule-transport-http

  1. protected HttpResponse doBad(RequestLine requestLine) throws MuleException
  2. {
  3. MuleMessage message = createMuleMessage(null);
  4. MuleEvent event = new DefaultMuleEvent(message, (InboundEndpoint) endpoint, flowConstruct);
  5. OptimizedRequestContext.unsafeSetEvent(event);
  6. HttpResponse response = new HttpResponse();
  7. response.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_BAD_REQUEST);
  8. response.setBody(HttpMessages.malformedSyntax().toString() + HttpConstants.CRLF);
  9. return transformResponse(response, event);
  10. }

代码示例来源:origin: org.mule.transports/mule-transport-http

  1. protected HttpResponse doOtherValid(RequestLine requestLine, String method) throws MuleException
  2. {
  3. MuleMessage message = createMuleMessage(null);
  4. MuleEvent event = new DefaultMuleEvent(message, (InboundEndpoint) endpoint, flowConstruct);
  5. OptimizedRequestContext.unsafeSetEvent(event);
  6. HttpResponse response = new HttpResponse();
  7. response.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_METHOD_NOT_ALLOWED);
  8. response.setBody(HttpMessages.methodNotAllowed(method).toString() + HttpConstants.CRLF);
  9. return transformResponse(response, event);
  10. }

代码示例来源:origin: org.mule.transports/mule-transport-http

  1. protected HttpResponse doBad(RequestLine requestLine) throws MuleException
  2. {
  3. MuleMessage message = getMessageReceiver().createMuleMessage(null);
  4. MuleEvent event = new DefaultMuleEvent(message, getInboundEndpoint(), getFlowConstruct());
  5. OptimizedRequestContext.unsafeSetEvent(event);
  6. HttpResponse response = new HttpResponse();
  7. response.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_BAD_REQUEST);
  8. response.setBody(HttpMessages.malformedSyntax().toString() + HttpConstants.CRLF);
  9. return transformResponse(response);
  10. }

相关文章