1 7 8 package com.sun.corba.se.spi.presentation.rmi ; 9 10 import java.rmi.RemoteException ; 11 12 import org.omg.CORBA.portable.Delegate ; 13 import org.omg.CORBA.ORB ; 14 import org.omg.CORBA.Request ; 15 import org.omg.CORBA.Context ; 16 import org.omg.CORBA.NamedValue ; 17 import org.omg.CORBA.NVList ; 18 import org.omg.CORBA.ContextList ; 19 import org.omg.CORBA.ExceptionList ; 20 import org.omg.CORBA.Policy ; 21 import org.omg.CORBA.DomainManager ; 22 import org.omg.CORBA.SetOverrideType ; 23 24 import org.omg.CORBA.portable.OutputStream ; 25 26 29 public class StubWrapper implements DynamicStub 30 { 31 private org.omg.CORBA.Object object ; 32 33 public StubWrapper( org.omg.CORBA.Object object ) 34 { 35 if (!(StubAdapter.isStub(object))) 36 throw new IllegalStateException () ; 37 38 this.object = object ; 39 } 40 41 public void setDelegate( Delegate delegate ) 42 { 43 StubAdapter.setDelegate( object, delegate ) ; 44 } 45 46 public Delegate getDelegate() 47 { 48 return StubAdapter.getDelegate( object ) ; 49 } 50 51 public ORB getORB() 52 { 53 return StubAdapter.getORB( object ) ; 54 } 55 56 public String [] getTypeIds() 57 { 58 return StubAdapter.getTypeIds( object ) ; 59 } 60 61 public void connect( ORB orb ) throws RemoteException 62 { 63 StubAdapter.connect( object, (com.sun.corba.se.spi.orb.ORB)orb ) ; 64 } 65 66 public boolean isLocal() 67 { 68 return StubAdapter.isLocal( object ) ; 69 } 70 71 public OutputStream request( String operation, boolean responseExpected ) 72 { 73 return StubAdapter.request( object, operation, responseExpected ) ; 74 } 75 76 public boolean _is_a(String repositoryIdentifier) 77 { 78 return object._is_a( repositoryIdentifier ) ; 79 } 80 81 public boolean _is_equivalent(org.omg.CORBA.Object other) 82 { 83 return object._is_equivalent( other ) ; 84 } 85 86 public boolean _non_existent() 87 { 88 return object._non_existent() ; 89 } 90 91 public int _hash(int maximum) 92 { 93 return object._hash( maximum ) ; 94 } 95 96 public org.omg.CORBA.Object _duplicate() 97 { 98 return object._duplicate() ; 99 } 100 101 public void _release() 102 { 103 object._release() ; 104 } 105 106 public org.omg.CORBA.Object _get_interface_def() 107 { 108 return object._get_interface_def() ; 109 } 110 111 public Request _request(String operation) 112 { 113 return object._request( operation ) ; 114 } 115 116 public Request _create_request( Context ctx, String operation, NVList arg_list, 117 NamedValue result) 118 { 119 return object._create_request( ctx, operation, arg_list, result ) ; 120 } 121 122 public Request _create_request( Context ctx, String operation, NVList arg_list, 123 NamedValue result, ExceptionList exclist, ContextList ctxlist) 124 { 125 return object._create_request( ctx, operation, arg_list, result, 126 exclist, ctxlist ) ; 127 } 128 129 public Policy _get_policy(int policy_type) 130 { 131 return object._get_policy( policy_type ) ; 132 } 133 134 public DomainManager [] _get_domain_managers() 135 { 136 return object._get_domain_managers() ; 137 } 138 139 public org.omg.CORBA.Object _set_policy_override( Policy [] policies, 140 SetOverrideType set_add) 141 { 142 return object._set_policy_override( policies, set_add ) ; 143 } 144 } 145 | Popular Tags |