1 29 30 package com.caucho.ejb.protocol; 31 32 import com.caucho.config.ConfigException; 33 import com.caucho.ejb.AbstractServer; 34 import com.caucho.ejb.EjbServerManager; 35 import com.caucho.util.L10N; 36 import com.caucho.vfs.Path; 37 38 43 public class ProtocolContainer { 44 private static final L10N L = new L10N(ProtocolContainer.class); 45 46 protected EjbProtocolManager _manager; 47 protected String _urlPrefix; 48 private Path _workPath; 49 50 public void setServerManager(EjbServerManager manager) 51 { 52 _manager = manager.getProtocolManager(); 53 } 54 55 public EjbProtocolManager getProtocolManager() 56 { 57 return _manager; 58 } 59 60 public void setProtocolManager(EjbProtocolManager manager) 61 { 62 _manager = manager; 63 } 64 65 public String getName() 66 { 67 return "jvm"; 68 } 69 70 public void setURLPrefix(String urlPrefix) 71 { 72 if (urlPrefix.endsWith("/")) 73 urlPrefix = urlPrefix.substring(urlPrefix.length() - 1); 74 75 _urlPrefix = urlPrefix; 76 } 77 78 public String getURLPrefix() 79 { 80 return _urlPrefix; 81 } 82 83 public void setWorkPath(Path workPath) 84 { 85 _workPath = workPath; 86 } 87 88 public Path getWorkPath() 89 { 90 return _workPath; 91 } 92 93 96 public void addServer(AbstractServer server) 97 { 98 } 99 100 103 public void removeServer(AbstractServer server) 104 { 105 } 106 107 protected HandleEncoder createHandleEncoder(AbstractServer server, 108 Class primaryKeyClass) 109 throws ConfigException 110 { 111 if (_urlPrefix != null) 112 return new HandleEncoder(server, _urlPrefix + server.getProtocolId()); 113 else 114 return new HandleEncoder(server, server.getProtocolId()); 115 } 116 117 120 public Skeleton getSkeleton(String uri, String queryString) 121 throws Exception 122 { 123 throw new UnsupportedOperationException (); 124 } 125 126 129 public Skeleton getExceptionSkeleton() 130 throws Exception 131 { 132 throw new UnsupportedOperationException (); 133 } 134 } 135 | Popular Tags |