001 // PhysicalMemoryFactory.java, created by wbeebee 002 // Copyright (C) 2001 Wes Beebee <wbeebee@mit.edu> 003 // Licensed under the terms of the GNU GPL; see COPYING for details. 004 package javax.realtime; 005 006 /** <code>PhysicalMemoryFactory</code> 007 * 008 * @author Wes Beebee <<a href="mailto:wbeebee@mit.edu">wbeebee@mit.edu</a>> 009 */ 010 011 public class PhysicalMemoryFactory { 012 013 /** */ 014 015 public synchronized Object create(String memoryType, 016 boolean foo, long base, 017 long size) { 018 if (memoryType.equals("scoped")) { 019 return new ScopedPhysicalMemory(base, size); 020 } else if (memoryType.equals("immortal")) { 021 return new ImmortalPhysicalMemory(base, size); 022 } 023 return null; 024 } 025 026 /** */ 027 028 public Object create(String memoryType, boolean foo, long size) { 029 return create(memoryType, foo, 0, size); 030 } 031 }