1 26 27 28 package org.objectweb.mobilitools.smi.api; 29 30 import org.omg.CfMAF.AgentSystemInfo; 31 import org.omg.CfMAF.LanguageMap; 32 import org.omg.CORBA.Any ; 33 34 35 52 public abstract class Constants 53 { 54 56 57 public static final short TYPE_ID = 10; 58 59 public static final short MAJOR_VERSION = 1; 60 61 public static final short MINOR_VERSION = 0; 62 63 public static final String DESCRIPTION = "Simple MAF Implementation"; 64 65 66 68 69 public static final short LANGUAGE_ID = 1; 70 71 public static final short SERIALIZATION = 1; 72 73 public static final String COSNAMINGURI = "CosNaming:"; 74 75 76 78 79 public static final String regionPrefixProp = "org.objectweb.mobilitools.smi.regionPrefix"; 80 81 public static final String regionPrefixDefault = "MAF"; 82 83 public static final String agencyPrefixProp = "org.objectweb.mobilitools.smi.agencyPrefix"; 84 85 public static final String agencyPrefixDefault = "agency"; 86 87 public static final String finderNameProp = "org.objectweb.mobilitools.smi.finderPrefix"; 88 89 public static final String finderNameDefault = "finder"; 90 91 92 95 96 public static final String agencyExitDelayProp = "org.objectweb.mobilitools.smi.agencyExitDelay"; 97 98 public static final String agencyExitDelayDefault = "10000"; 99 100 101 103 104 public static final String classLoaderProp = "org.objectweb.mobilitools.smi.classloader"; 105 106 public static final String classLoaderDefault = "org.objectweb.mobilitools.smi.lib.SMIClassLoader"; 107 108 public static final String classLoaderMethod = "getClassLoader"; 109 110 111 113 114 public static final RuntimeException agencyIsClosed = 115 new RuntimeException ("The agency is terminated."); 116 117 122 public static final AgentSystemInfo makeAgentSystemInfo(byte[] authority, byte[] identity) 123 { 124 return new AgentSystemInfo( 125 new org.omg.CfMAF.Name( 126 authority, 127 identity, 128 TYPE_ID), 129 TYPE_ID, 130 new LanguageMap[] { 131 new LanguageMap( 132 LANGUAGE_ID, 133 new short[] { SERIALIZATION }) 134 }, 135 DESCRIPTION, 136 MAJOR_VERSION, 137 MINOR_VERSION, 138 new Any [0]); 139 } 140 141 142 145 public static void main(String [] args) 146 { 147 System.out.println("MobiliTools version $Name: $"); 148 } 149 }; 150 | Popular Tags |