Changeset 25635 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java
- Timestamp:
- 2012-05-22T13:01:04+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java
r24993 r25635 32 32 33 33 import java.io.*; 34 import java.io.File;35 import java.io.RandomAccessFile;36 34 import java.util.HashMap; 37 35 import java.util.Iterator; … … 76 74 * 77 75 */ 78 protected HashMap service_map = null;76 protected HashMap<String, ServiceRack> service_map = null; 79 77 /** 80 78 * maps pseudo service names to real service names - needed if we have two 81 79 * services with the same name for one collection 82 80 */ 83 protected HashMap service_name_map = null;81 protected HashMap<String, String> service_name_map = null; 84 82 85 83 /** XML converter for String to DOM and vice versa */ … … 113 111 public void cleanUp() 114 112 { 115 Iterator i = this.service_map.values().iterator();113 Iterator<ServiceRack> i = this.service_map.values().iterator(); 116 114 while (i.hasNext()) 117 115 { 118 ServiceRack s = (ServiceRack)i.next();116 ServiceRack s = i.next(); 119 117 s.cleanUp(); 120 118 } … … 134 132 public ServiceCluster() 135 133 { 136 this.service_map = new HashMap ();137 this.service_name_map = new HashMap ();134 this.service_map = new HashMap<String, ServiceRack>(); 135 this.service_name_map = new HashMap<String, String>(); 138 136 this.converter = new XMLConverter(); 139 137 this.doc = this.converter.newDOM(); … … 491 489 if (this.service_name_map.containsKey(service)) 492 490 { 493 real_service = (String)this.service_name_map.get(service);491 real_service = this.service_name_map.get(service); 494 492 // need to change the to att in the request - give the real service name 495 493 to = request.getAttribute(GSXML.TO_ATT); … … 501 499 Element single_message = mess_doc.createElement(GSXML.MESSAGE_ELEM); 502 500 single_message.appendChild(request); 503 Node response_message = ((ModuleInterface) this.service_map.get(service)).process(single_message);501 Node response_message = this.service_map.get(service).process(single_message); 504 502 if (response_message != null) 505 503 { … … 884 882 } 885 883 886 public HashMap getServiceMap()884 public HashMap<String, ServiceRack> getServiceMap() 887 885 { 888 886 return service_map;
Note:
See TracChangeset
for help on using the changeset viewer.