本文整理了Java中org.mule.config.i18n.Message
类的一些代码示例,展示了Message
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message
类的具体详情如下:
包路径:org.mule.config.i18n.Message
类名称:Message
暂无
代码示例来源:origin: org.mule/mule-core
@Override
protected String generateMessage(Message message)
{
return message.getMessage();
}
代码示例来源: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/mule-core
/**
* Factory method to create a {@link Message} instance that is not read from a resource bundle.
*
* @param message Message's message text
* @return a Messsage instance that has an error code of -1 and no arguments.
*/
public static Message createStaticMessage(String message)
{
return new Message(message, STATIC_ERROR_CODE, EMPTY_ARGS);
}
代码示例来源:origin: org.mule.modules/mule-module-launcher
/**
* Will shut down the server displaying the cause and time of the shutdown
*
* @param e the exception that caused the shutdown
*/
public void shutdown(Throwable e) throws MuleException
{
Message msg = CoreMessages.fatalErrorWhileRunning();
MuleException muleException = ExceptionHelper.getRootMuleException(e);
if (muleException != null)
{
logger.fatal(muleException.getDetailedMessage());
}
else
{
logger.fatal(msg.toString() + " " + e.getMessage(), e);
}
List<String> msgs = new ArrayList<String>();
msgs.add(msg.getMessage());
Throwable root = ExceptionHelper.getRootException(e);
msgs.add(root.getMessage() + " (" + root.getClass().getName() + ")");
msgs.add(" ");
msgs.add(CoreMessages.fatalErrorInShutdown().getMessage());
String shutdownMessage = StringMessageUtils.getBoilerPlate(msgs, '*', 80);
logger.fatal(shutdownMessage);
unregisterShutdownHook();
doShutdown();
System.exit(1);
}
代码示例来源:origin: org.mule/mule-core
public int getMessageCode()
{
return (i18nMessage == null ? 0 : i18nMessage.getCode());
}
代码示例来源:origin: org.mule/mule-core
logger.fatal(msg.toString() + " " + e.getMessage(), e);
msgs.add(msg.getMessage());
Throwable root = ExceptionHelper.getRootException(e);
msgs.add(root.getMessage() + " (" + root.getClass().getName() + ")");
msgs.add(" ");
msgs.add(CoreMessages.fatalErrorInShutdown().getMessage());
String shutdownMessage = StringMessageUtils.getBoilerPlate(msgs, '*', 80);
logger.fatal(shutdownMessage);
代码示例来源:origin: org.mule/mule-core
public String toString()
{
return this.getMessage();
}
}
代码示例来源: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.transports/mule-transport-quartz
if (tempJob == null)
throw new JobExecutionException(QuartzMessages.invalidPayloadType().getMessage());
throw new JobExecutionException(QuartzMessages.invalidJobObject().getMessage());
throw new JobExecutionException(QuartzMessages.invalidJobObject().toString());
代码示例来源:origin: org.mule/mule-core
/**
* Factory method to create a {@link Message} instance that is not read from a resource bundle.
*
* @param message Static message text that may contain format specifiers
* @param arguments Arguments referenced by the format specifiers in the message string.
* @return a Messsage instance that has an error code of -1 and no arguments.
*/
public static Message createStaticMessage(String message, Object... arguments)
{
return new Message(String.format(message, arguments), STATIC_ERROR_CODE, EMPTY_ARGS);
}
代码示例来源:origin: org.mule/mule-core
/**
* @param message the exception message
*/
public MuleRuntimeException(Message message)
{
super(message.getMessage());
}
代码示例来源: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
/**
* Factory method to create a new {@link Message} instance that is filled with the formatted
* message with id <code>code</code> from the resource bundle <code>bundlePath</code>.
*
* @param bundlePath complete path to the resource bundle for lookup
* @param code numeric code of the message
*/
protected Message createMessage(String bundlePath, int code)
{
String messageString = getString(bundlePath, code, null);
return new Message(messageString, code, EMPTY_ARGS);
}
代码示例来源:origin: org.mule/mule-core
/**
* @param message the exception message
* @param cause the exception that triggered this exception
*/
public MuleRuntimeException(Message message, Throwable cause)
{
super(message.getMessage(), cause);
}
代码示例来源: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
/**
* Factory method to create a new {@link Message} instance that is filled with the formatted
* message with id <code>code</code> from the resource bundle <code>bundlePath</code>.
*
* <b>Attention:</b> do not confuse this method with
* <code>createMessage(String, int, Object)</code>.
*
* @param bundlePath complete path to the resource bundle for lookup
* @param code numeric code of the message
* @param arguments
* @see #getBundlePath(String)
*/
protected Message createMessage(String bundlePath, int code, Object... arguments)
{
String messageString = getString(bundlePath, code, arguments);
return new Message(messageString, code, arguments);
}
代码示例来源:origin: org.mule.modules/mule-module-validation
@Override
protected String generateMessage(Message message)
{
return message.getMessage();
}
}
代码示例来源: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.modules/mule-module-plexus
public void configure(Reader configuration) throws ContainerException
{
try {
container.setConfiguration(configuration);
container.start();
} catch (Exception e) {
throw new ContainerException(new Message(Messages.FAILED_TO_CONFIGURE_CONTAINER), e);
}
}
代码示例来源:origin: org.mule/mule-core
public String getMessage()
{
return message + (nextMessage != null ? ". " + nextMessage.getMessage() : "");
}
内容来源于网络,如有侵权,请联系作者删除!