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

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

本文整理了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

public KeyedPoolMessageDispatcherFactoryAdapter(MessageDispatcherFactory factory)
{
  super();
  if (factory == null)
  {
    throw new IllegalArgumentException(CoreMessages.objectIsNull("factory").toString());
  }
  this.factory = factory;
}

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

public void setCookieSpec(String cookieSpec)
{
  if (!(COOKIE_SPEC_NETSCAPE.equalsIgnoreCase(cookieSpec) || COOKIE_SPEC_RFC2109.equalsIgnoreCase(cookieSpec)))
  {
    throw new IllegalArgumentException(
        CoreMessages.propertyHasInvalidValue("cookieSpec", cookieSpec).toString());
  }
  this.cookieSpec = cookieSpec;
}

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

public KeyedPoolMessageRequesterFactoryAdapter(MessageRequesterFactory factory)
{
  super();
  if (factory == null)
  {
    throw new IllegalArgumentException(CoreMessages.objectIsNull("factory").toString());
  }
  this.factory = factory;
}

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

/**
 * An optional error message can be set if the invocation state is not {@link org.mule.api.model.InvocationResult.State#SUCCESSFUL}
 *
 * @param message the error message
 */
public void setErrorMessage(String message)
{
  if (state == State.SUCCESSFUL)
  {
    throw new IllegalStateException(CoreMessages.invocationSuccessfulCantSetError().toString());
  }
  errorMessage = message;
}

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

@Override
public void setName(String newName)
{
  if (newName == null)
  {
    throw new IllegalArgumentException(CoreMessages.objectIsNull("Connector name").toString());
  }
  if (logger.isDebugEnabled())
  {
    logger.debug("Set Connector name to: " + newName);
  }
  name = newName;
}

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

public static Properties loadProperties(InputStream is) throws IOException
{
  if (is == null)
  {
    Message error = CoreMessages.objectIsNull("input stream");
    throw new IOException(error.toString());
  }
  try
  {
    Properties props = new Properties();
    props.load(is);
    return props;
  }
  finally
  {
    is.close();
  }
}

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

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

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

public static Properties loadProperties(URL url) throws IOException
{
  if (url == null)
  {
    Message error = CoreMessages.objectIsNull("url");
    throw new IOException(error.toString());
  }
  return loadProperties(url.openStream());
}

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

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

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

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

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

protected void init()
{
  if (monitorFrequency <= 0)
  {
    throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("monitorFrequency",
        new Integer(monitorFrequency)).toString());
  }
  monitors = new ConcurrentHashMap();
  if (scheduler == null)
  {
    this.scheduler = new ScheduledThreadPoolExecutor(1);
    scheduler.setThreadFactory(new DaemonThreadFactory(name + ".expiry.monitor", contextClassLoader));
    scheduler.scheduleWithFixedDelay(this, 0, monitorFrequency,
                     TimeUnit.MILLISECONDS);
  }
}

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

private void checkNull(Scheduler postProcessedScheduler)
{
  if (postProcessedScheduler == null)
  {
    throw new SchedulerCreationException(objectIsNull("scheduler").toString());
  }
}

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

public String getScheme(Method method)
{
  InterfaceBinding router = routers.get(method.toString());
  if (router == null)
  {
    throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString());
  }
  return router.getEndpoint().getEndpointURI().getScheme();
}

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

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

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

public void initialise() throws InitialisationException
{
  if (name == null)
  {
    name = UUID.getUUID();
  }
  if (expirationInterval <= 0)
  {
    throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval",
        new Integer(expirationInterval)).toString());
  }
  if (scheduler == null)
  {
    this.scheduler = new ScheduledThreadPoolExecutor(1);
    scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", this.getClass().getClassLoader()));
    scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS);
  }
}

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

@Override
public void initialise() throws InitialisationException
{
  if (name == null)
  {
    name = UUID.getUUID();
  }
  if (expirationInterval <= 0)
  {
    throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval",
      new Integer(expirationInterval)).toString());
  }
  if (scheduler == null)
  {
    this.scheduler = new ScheduledThreadPoolExecutor(1);
    scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", context.getExecutionClassLoader()));
    scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS);
  }
}

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

public InvocationResult invoke(Object component, MuleEventContext context) throws Exception
{
  if (component instanceof Callable)
  {
    Object result = ((Callable) component).onCall(context);
    return new InvocationResult(this, result, callableMethod);
  }
  else
  {
    InvocationResult result = new InvocationResult(this, InvocationResult.State.NOT_SUPPORTED);
    result.setErrorMessage(CoreMessages.objectDoesNotImplementInterface(component, Callable.class).toString());
    return result;
  }
}

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

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

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

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

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

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

相关文章

微信公众号

最新文章

更多