public String toString() { return "ServiceContext[ id=" + getId() + " ]"; } }
/** * Write the given entry from the scMap to the OutputStream. See note on giopVersion. The service context should * know the GIOP version it is meant for. */ private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) { // If it's still in byte[] form, we don't need to // unmarshal it here, just copy the bytes into // the new stream. if (scObj instanceof byte[]) { if (isDebugging(os)) dprint("Writing service context bytes for id " + id); OctetSeqHelper.write(os, (byte[]) scObj); } else { // We actually unmarshaled it into a ServiceContext // at some point. ServiceContext sc = (ServiceContext) scObj; if (isDebugging(os)) dprint("Writing service context " + sc); sc.write(os, gv); } }
public void delete(int scId) { this.delete(new Integer(scId)); }
/** * Register the ServiceContext class so that it will be recognized by the read method. Class cls must have the * following properties: * <ul> * <li>It must derive from org.jboss.com.sun.corba.se.spi.servicecontext.ServiceContext.</li> * <li>It must have a public static final int SERVICE_CONTEXT_ID member.</li> * <li>It must implement a constructor that takes a org.omg.CORBA_2_3.portable.InputStream argument.</li> * </ul> */ public void register(Class<?> cls) { if (ORB.ORBInitDebug) dprint("Registering service context class " + cls); ServiceContextData scd = new ServiceContextData(cls); if (findServiceContextData(scd.getId()) == null) scCollection.addElement(scd); else throw new BAD_PARAM("Tried to register duplicate service context"); }
public ServiceContextData findServiceContextData(int scId) { if (ORB.ORBInitDebug) dprint("Searching registry for service context id " + scId); Enumeration<ServiceContextData> enumeration = scCollection.elements(); while (enumeration.hasMoreElements()) { ServiceContextData scd = enumeration.nextElement(); if (scd.getId() == scId) { if (ORB.ORBInitDebug) dprint("Service context data found: " + scd); return scd; } } if (ORB.ORBInitDebug) dprint("Service context data not found"); return null; } }
public ServiceContext get(int scId) { return this.get(new Integer(scId)); }
public static void writeNullServiceContext(OutputStream os) { if (isDebugging(os)) ORBUtility.dprint("ServiceContexts", "Writing null service context"); os.write_long(0); }
public void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.service_contexts = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream); this.request_id = istream.read_ulong(); this.response_expected = istream.read_boolean(); int _len0 = istream.read_long(); this.object_key = new byte[_len0]; istream.read_octet_array(this.object_key, 0, _len0); this.operation = istream.read_string(); this.requesting_principal = istream.read_Principal(); }
public ServiceContext get(Integer id) { Object result = scMap.get(id); if (result == null) return null; // Lazy unmarshaling on first use. if (result instanceof byte[]) { ServiceContext sc = unmarshal(id, (byte[]) result); scMap.put(id, sc); return sc; } else { return (ServiceContext) result; } }
/** * Register the ServiceContext class so that it will be recognized by the read method. Class cls must have the * following properties: * <ul> * <li>It must derive from org.jboss.com.sun.corba.se.spi.servicecontext.ServiceContext.</li> * <li>It must have a public static final int SERVICE_CONTEXT_ID member.</li> * <li>It must implement a constructor that takes a org.omg.CORBA_2_3.portable.InputStream argument.</li> * </ul> */ public void register(Class<?> cls) { if (ORB.ORBInitDebug) dprint("Registering service context class " + cls); ServiceContextData scd = new ServiceContextData(cls); if (findServiceContextData(scd.getId()) == null) scCollection.addElement(scd); else throw new BAD_PARAM("Tried to register duplicate service context"); }
/** * Write the given entry from the scMap to the OutputStream. See note on giopVersion. The service context should * know the GIOP version it is meant for. */ private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) { // If it's still in byte[] form, we don't need to // unmarshal it here, just copy the bytes into // the new stream. if (scObj instanceof byte[]) { if (isDebugging(os)) dprint("Writing service context bytes for id " + id); OctetSeqHelper.write(os, (byte[]) scObj); } else { // We actually unmarshaled it into a ServiceContext // at some point. ServiceContext sc = (ServiceContext) scObj; if (isDebugging(os)) dprint("Writing service context " + sc); sc.write(os, gv); } }
public ServiceContextData findServiceContextData(int scId) { if (ORB.ORBInitDebug) dprint("Searching registry for service context id " + scId); Enumeration<ServiceContextData> enumeration = scCollection.elements(); while (enumeration.hasMoreElements()) { ServiceContextData scd = enumeration.nextElement(); if (scd.getId() == scId) { if (ORB.ORBInitDebug) dprint("Service context data found: " + scd); return scd; } } if (ORB.ORBInitDebug) dprint("Service context data not found"); return null; } }
public String toString() { return "ServiceContext[ id=" + getId() + " ]"; } }
public void delete(int scId) { this.delete(new Integer(scId)); }
public ServiceContext get(int scId) { return this.get(new Integer(scId)); }
public static void writeNullServiceContext(OutputStream os) { if (isDebugging(os)) ORBUtility.dprint("ServiceContexts", "Writing null service context"); os.write_long(0); }
public void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.service_contexts = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream); this.request_id = istream.read_ulong(); this.response_expected = istream.read_boolean(); int _len0 = istream.read_long(); this.object_key = new byte[_len0]; istream.read_octet_array(this.object_key, 0, _len0); this.operation = istream.read_string(); this.requesting_principal = istream.read_Principal(); }
public ServiceContext get(Integer id) { Object result = scMap.get(id); if (result == null) return null; // Lazy unmarshaling on first use. if (result instanceof byte[]) { ServiceContext sc = unmarshal(id, (byte[]) result); scMap.put(id, sc); return sc; } else { return (ServiceContext) result; } }
/** * Add a service context to the stream, if there is not already a service context in this object with the same id as * sc. */ public void put(ServiceContext sc) { Integer id = new Integer(sc.getId()); scMap.put(id, sc); }
/** * Add a service context to the stream, if there is not already a service context in this object with the same id as * sc. */ public void put(ServiceContext sc) { Integer id = new Integer(sc.getId()); scMap.put(id, sc); }