Methods Summary |
---|
public org.omg.CORBA.Request | create_request(org.omg.CORBA.Object obj, org.omg.CORBA.Context ctx, java.lang.String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result)
return new RequestImpl(orb, obj, ctx, operation, arg_list,
result, null, null);
|
public org.omg.CORBA.Request | create_request(org.omg.CORBA.Object obj, org.omg.CORBA.Context ctx, java.lang.String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result, org.omg.CORBA.ExceptionList exclist, org.omg.CORBA.ContextList ctxlist)
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
|
public org.omg.CORBA.Object | duplicate(org.omg.CORBA.Object obj)
return obj;
|
public boolean | equals(org.omg.CORBA.Object self, java.lang.Object other)This method overrides the org.omg.CORBA.portable.Delegate.equals method,
and does the equality check based on IOR equality.
if (other == null)
return false ;
if (!StubAdapter.isStub(other)) {
return false;
}
Delegate delegate = StubAdapter.getDelegate( other ) ;
if (delegate == null)
return false ;
if (delegate instanceof CorbaClientDelegateImpl) {
CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
delegate ;
IOR otherIor = otherDel.contactInfoList.getTargetIOR();
return this.contactInfoList.getTargetIOR().equals(otherIor);
}
// Come here if other is not implemented by our ORB.
return false;
|
public com.sun.corba.se.pept.broker.Broker | getBroker()
return orb;
|
private com.sun.corba.se.pept.protocol.ClientRequestDispatcher | getClientRequestDispatcher()
return (ClientRequestDispatcher)
((CorbaInvocationInfo)orb.getInvocationInfo())
.getClientRequestDispatcher();
|
public com.sun.corba.se.pept.transport.ContactInfoList | getContactInfoList()
return contactInfoList;
|
public java.lang.String | get_codebase(org.omg.CORBA.Object self)
if (contactInfoList.getTargetIOR() != null) {
return contactInfoList.getTargetIOR().getProfile().getCodebase();
}
return null;
|
public org.omg.CORBA.Object | get_interface_def(org.omg.CORBA.Object obj)
InputStream is = null;
// instantiate the stub
org.omg.CORBA.Object stub = null ;
try {
OutputStream os = request(null, "_interface", true);
is = (InputStream) invoke((org.omg.CORBA.Object)null, os);
org.omg.CORBA.Object objimpl =
(org.omg.CORBA.Object) is.read_Object();
// check if returned object is of correct type
if ( !objimpl._is_a("IDL:omg.org/CORBA/InterfaceDef:1.0") )
throw wrapper.wrongInterfaceDef(CompletionStatus.COMPLETED_MAYBE);
try {
stub = (org.omg.CORBA.Object)
JDKBridge.loadClass("org.omg.CORBA._InterfaceDefStub").
newInstance();
} catch (Exception ex) {
throw wrapper.noInterfaceDefStub( ex ) ;
}
org.omg.CORBA.portable.Delegate del =
StubAdapter.getDelegate( objimpl ) ;
StubAdapter.setDelegate( stub, del ) ;
} catch (ApplicationException e) {
// This cannot happen.
throw wrapper.applicationExceptionInSpecialMethod( e ) ;
} catch (RemarshalException e) {
return get_interface_def(obj);
} finally {
releaseReply((org.omg.CORBA.Object)null, (InputStream)is);
}
return stub;
|
public int | hash(org.omg.CORBA.Object obj, int maximum)
int h = this.hashCode();
if ( h > maximum )
return 0;
return h;
|
public int | hashCode(org.omg.CORBA.Object obj)
return this.hashCode() ;
|
public int | hashCode()
return this.contactInfoList.hashCode();
|
public org.omg.CORBA.portable.InputStream | invoke(org.omg.CORBA.Object self, org.omg.CORBA.portable.OutputStream output)
ClientRequestDispatcher subcontract = getClientRequestDispatcher();
return (InputStream)
subcontract.marshalingComplete((Object)self, (OutputObject)output);
|
public boolean | is_a(org.omg.CORBA.Object obj, java.lang.String dest)
// dest is the typeId of the interface to compare against.
// repositoryIds is the list of typeIds that the stub knows about.
// First we look for an answer using local information.
String [] repositoryIds = StubAdapter.getTypeIds( obj ) ;
String myid = contactInfoList.getTargetIOR().getTypeId();
if ( dest.equals(myid) ) {
return true;
}
for ( int i=0; i<repositoryIds.length; i++ ) {
if ( dest.equals(repositoryIds[i]) ) {
return true;
}
}
// But repositoryIds may not be complete, so it may be necessary to
// go to server.
InputStream is = null;
try {
OutputStream os = request(null, "_is_a", true);
os.write_string(dest);
is = (InputStream) invoke((org.omg.CORBA.Object) null, os);
return is.read_boolean();
} catch (ApplicationException e) {
// This cannot happen.
throw wrapper.applicationExceptionInSpecialMethod( e ) ;
} catch (RemarshalException e) {
return is_a(obj, dest);
} finally {
releaseReply((org.omg.CORBA.Object)null, (InputStream)is);
}
|
public boolean | is_equivalent(org.omg.CORBA.Object obj, org.omg.CORBA.Object ref)
if ( ref == null )
return false;
// If ref is a local object, it is not a Stub!
if (!StubAdapter.isStub(ref))
return false ;
Delegate del = StubAdapter.getDelegate(ref) ;
if (del == null)
return false ;
// Optimize the x.is_equivalent( x ) case
if (del == this)
return true;
// If delegate was created by a different ORB, return false
if (!(del instanceof CorbaClientDelegateImpl))
return false ;
CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
CorbaContactInfoList ccil =
(CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
return this.contactInfoList.getTargetIOR().isEquivalent(
ccil.getTargetIOR() );
|
public boolean | is_local(org.omg.CORBA.Object self)Returns true if this object is implemented by a local servant.
REVISIT: locatedIOR should be replaced with a method call that
returns the current IOR for this request (e.g. ContactInfoChooser).
// XXX this need to check isNextCallValid
return contactInfoList.getEffectiveTargetIOR().getProfile().
isLocal();
|
public boolean | non_existent(org.omg.CORBA.Object obj)
InputStream is = null;
try {
OutputStream os = request(null, "_non_existent", true);
is = (InputStream) invoke((org.omg.CORBA.Object)null, os);
return is.read_boolean();
} catch (ApplicationException e) {
// This cannot happen.
throw wrapper.applicationExceptionInSpecialMethod( e ) ;
} catch (RemarshalException e) {
return non_existent(obj);
} finally {
releaseReply((org.omg.CORBA.Object)null, (InputStream)is);
}
|
public org.omg.CORBA.ORB | orb(org.omg.CORBA.Object obj)
return this.orb;
|
public void | release(org.omg.CORBA.Object obj)
// DO NOT clear out internal variables to release memory
// This delegate may be pointed-to by other objrefs.
|
public void | releaseReply(org.omg.CORBA.Object self, org.omg.CORBA.portable.InputStream input)
// NOTE: InputStream may be null (e.g., exception request from PI).
ClientRequestDispatcher subcontract = getClientRequestDispatcher();
subcontract.endRequest(orb, self, (InputObject)input);
orb.releaseOrDecrementInvocationInfo();
|
public org.omg.CORBA.Request | request(org.omg.CORBA.Object obj, java.lang.String operation)
return new RequestImpl(orb, obj, null, operation, null, null, null,
null);
|
public org.omg.CORBA.portable.OutputStream | request(org.omg.CORBA.Object self, java.lang.String operation, boolean responseExpected)
ClientInvocationInfo invocationInfo =
orb.createOrIncrementInvocationInfo();
Iterator contactInfoListIterator =
invocationInfo.getContactInfoListIterator();
if (contactInfoListIterator == null) {
contactInfoListIterator = contactInfoList.iterator();
invocationInfo.setContactInfoListIterator(contactInfoListIterator);
}
if (! contactInfoListIterator.hasNext()) {
throw ((CorbaContactInfoListIterator)contactInfoListIterator)
.getFailureException();
}
CorbaContactInfo contactInfo = (CorbaContactInfo) contactInfoListIterator.next();
ClientRequestDispatcher subcontract = contactInfo.getClientRequestDispatcher();
// Remember chosen subcontract for invoke and releaseReply.
// NOTE: This is necessary since a stream is not available in
// releaseReply if there is a client marshaling error or an
// error in _invoke.
invocationInfo.setClientRequestDispatcher(subcontract);
return (OutputStream)
subcontract.beginRequest(self, operation,
!responseExpected, contactInfo);
|
public void | servant_postinvoke(org.omg.CORBA.Object self, org.omg.CORBA.portable.ServantObject servant)
contactInfoList.getLocalClientRequestDispatcher()
.servant_postinvoke(self, servant);
|
public org.omg.CORBA.portable.ServantObject | servant_preinvoke(org.omg.CORBA.Object self, java.lang.String operation, java.lang.Class expectedType)
return
contactInfoList.getLocalClientRequestDispatcher()
.servant_preinvoke(self, operation, expectedType);
|
public java.lang.String | toString(org.omg.CORBA.Object self)
return contactInfoList.getTargetIOR().stringify();
|