View Javadoc

1   /*
2    * $Id: TcpMessages.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.tcp.i18n;
12  
13  import org.mule.config.i18n.Message;
14  import org.mule.config.i18n.MessageFactory;
15  import org.mule.transport.tcp.TcpConnector;
16  
17  import java.net.URI;
18  
19  public class TcpMessages extends MessageFactory
20  {
21      private static final TcpMessages factory = new TcpMessages();
22      
23      private static final String BUNDLE_PATH = getBundlePath(TcpConnector.TCP);
24  
25      public static Message failedToBindToUri(URI uri)
26      {
27          return factory.createMessage(BUNDLE_PATH, 1, uri);
28      }
29  
30      public static Message failedToCloseSocket()
31      {
32          return factory.createMessage(BUNDLE_PATH, 2);
33      }
34  
35      public static Message failedToInitMessageReader()
36      {
37          return factory.createMessage(BUNDLE_PATH, 3);
38      }
39  
40      public static Message invalidStreamingOutputType(Class c)
41      {
42          return factory.createMessage(BUNDLE_PATH, 4, c.getName());
43      }
44  
45      public static Message pollingReceiverCannotbeUsed()
46      {
47          return factory.createMessage(BUNDLE_PATH, 5);
48      }
49  }
50  
51