Methods Summary |
---|
private int | findDeclaredException(java.lang.Class cls)
for (int ctr = 0; ctr < rws.length; ctr++) {
Class next = rws[ctr].getExceptionClass() ;
if (next.isAssignableFrom(cls))
return ctr ;
}
return -1 ;
|
private int | findDeclaredException(java.lang.String repositoryId)
for (int ctr=0; ctr<rws.length; ctr++) {
// This may occur when rws has not been fully
// populated, in which case the search should just fail.
if (rws[ctr]==null)
return -1 ;
String rid = rws[ctr].getId() ;
if (repositoryId.equals( rid ))
return ctr ;
}
return -1 ;
|
public com.sun.corba.se.impl.presentation.rmi.ExceptionHandlerImpl$ExceptionRW | getRMIExceptionRW(java.lang.Class cls)
return new ExceptionRWRMIImpl( cls ) ;
|
public boolean | isDeclaredException(java.lang.Class cls)
return findDeclaredException( cls ) >= 0 ;
|
public java.lang.Exception | readException(org.omg.CORBA.portable.ApplicationException ae)
// Note that the exception ID is present in both ae
// and in the input stream from ae. The exception
// reader must actually read the exception ID from
// the stream.
InputStream is = (InputStream)ae.getInputStream() ;
String excName = ae.getId() ;
int index = findDeclaredException( excName ) ;
if (index < 0) {
excName = is.read_string() ;
Exception res = new UnexpectedException( excName ) ;
res.initCause( ae ) ;
return res ;
}
return rws[index].read( is ) ;
|
public void | writeException(org.omg.CORBA_2_3.portable.OutputStream os, java.lang.Exception ex)
int index = findDeclaredException( ex.getClass() ) ;
if (index < 0)
throw wrapper.writeUndeclaredException( ex,
ex.getClass().getName() ) ;
rws[index].write( os, ex ) ;
|