View Javadoc

1   package org.codehaus.xfire.transport.local;
2   
3   import org.apache.commons.logging.Log;
4   import org.apache.commons.logging.LogFactory;
5   import org.codehaus.xfire.transport.AbstractTransport;
6   import org.codehaus.xfire.transport.Channel;
7   import org.codehaus.xfire.transport.DefaultEndpoint;
8   
9   /***
10   * A transport which passes messages via the JVM.
11   * 
12   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
13   */
14  public class LocalTransport
15      extends AbstractTransport
16  {
17      private static final Log log = LogFactory.getLog(LocalTransport.class);
18      
19      public final static String NAME = "urn:xfire:transport:local";
20      public final static String URI_PREFIX = "xfire.local://";
21      
22      public String getName()
23      {
24          return NAME;
25      }
26  
27      protected Channel createNewChannel(String uri)
28      {
29          log.debug("Creating new channel for uri: " + uri);
30          
31          LocalChannel c = new LocalChannel(uri, this);
32          c.setEndpoint(new DefaultEndpoint());
33  
34          return c;
35      }
36  
37      protected String getUriPrefix()
38      {
39          return URI_PREFIX;
40      }
41  
42      public String[] getKnownUriSchemes()
43      {
44          return new String[] { URI_PREFIX };
45      }
46  }