1 7 package com.sun.corba.se.spi.oa; 8 9 import javax.rmi.CORBA.Tie ; 10 11 import org.omg.CORBA.portable.ServantObject ; 12 13 import org.omg.PortableServer.Servant ; 14 15 import org.omg.PortableServer.ServantLocatorPackage.CookieHolder ; 16 17 import com.sun.corba.se.spi.oa.ObjectAdapter ; 18 import com.sun.corba.se.spi.copyobject.ObjectCopierFactory ; 19 20 24 public class OAInvocationInfo extends ServantObject { 25 private java.lang.Object servantContainer ; 30 31 private ObjectAdapter oa; 33 private byte[] oid; 34 35 private CookieHolder cookieHolder; 37 private String operation; 38 39 private ObjectCopierFactory factory ; 42 43 public OAInvocationInfo(ObjectAdapter oa, byte[] id ) 44 { 45 this.oa = oa; 46 this.oid = id; 47 } 48 49 public OAInvocationInfo( OAInvocationInfo info, String operation ) 51 { 52 this.servant = info.servant ; 53 this.servantContainer = info.servantContainer ; 54 this.cookieHolder = info.cookieHolder ; 55 this.oa = info.oa; 56 this.oid = info.oid; 57 this.factory = info.factory ; 58 59 this.operation = operation; 60 } 61 62 public ObjectAdapter oa() { return oa ; } 64 public byte[] id() { return oid ; } 65 public Object getServantContainer() { return servantContainer ; } 66 67 public CookieHolder getCookieHolder() 70 { 71 if (cookieHolder == null) 72 cookieHolder = new CookieHolder () ; 73 74 return cookieHolder; 75 } 76 77 public String getOperation() { return operation; } 78 public ObjectCopierFactory getCopierFactory() { return factory; } 79 80 public void setOperation( String operation ) { this.operation = operation ; } 82 public void setCopierFactory( ObjectCopierFactory factory ) { this.factory = factory ; } 83 84 public void setServant(Object servant) 85 { 86 servantContainer = servant ; 87 if (servant instanceof Tie ) 88 this.servant = ((Tie )servant).getTarget() ; 89 else 90 this.servant = servant; 91 } 92 } 93 | Popular Tags |