/**
* Test catching the user exception, thrown on the remote side.
*/
public void testUserException()
{
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
exList, null
);
rq.add_in_arg().insert_long(123);
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."
);
}
java类org.omg.CORBA.ExceptionList的实例源码
RequestTest.java 文件源码
项目:javify
阅读 29
收藏 0
点赞 0
评论 0
SimpleDelegate.java 文件源码
项目:javify
阅读 36
收藏 0
点赞 0
评论 0
/**
* Create the request for the local call.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns, ExceptionList exceptions,
ContextList ctx_list
)
{
if (orb instanceof OrbFunctional)
{
((OrbFunctional) orb).ensureRunning();
}
gnuRequest g = new gnuRequest();
g.setORB(orb);
g.setOperation(operation);
g.setIor(ior);
g.m_target = target;
g.ctx(context);
g.set_args(parameters);
g.set_exceptions(exceptions);
g.set_context_list(ctx_list);
if (returns != null)
g.set_result(returns);
return g;
}
gnuClientRequestInfo.java 文件源码
项目:javify
阅读 24
收藏 0
点赞 0
评论 0
/** @inheritDoc */
public TypeCode[] exceptions()
{
request.checkDii();
ExceptionList ex = request.exceptions();
TypeCode[] et = new TypeCode[ ex.count() ];
try
{
for (int i = 0; i < et.length; i++)
{
et [ i ] = ex.item(i);
}
}
catch (Bounds e)
{
throw new Unexpected(e);
}
return et;
}
IorDelegate.java 文件源码
项目:javify
阅读 22
收藏 0
点赞 0
评论 0
/**
* Creates the request to invoke the method on this object.
*
* @param target the object, for that the operation must be invoked.
* @param context context (null allowed)
* @param operation the method name
* @param parameters the method parameters
* @param returns the return value holder
*
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters, NamedValue returns,
ExceptionList exceptions, ContextList ctx_list
)
{
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
request.setOperation(operation);
request.set_args(parameters);
request.m_context = context;
request.set_result(returns);
request.set_exceptions(exceptions);
request.set_context_list(ctx_list);
request.setORB(orb);
return request;
}
RequestTest.java 文件源码
项目:jvm-stm
阅读 27
收藏 0
点赞 0
评论 0
/**
* Test catching the user exception, thrown on the remote side.
*/
public void testUserException()
{
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
exList, null
);
rq.add_in_arg().insert_long(123);
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."
);
}
SimpleDelegate.java 文件源码
项目:jvm-stm
阅读 25
收藏 0
点赞 0
评论 0
/**
* Create the request for the local call.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns, ExceptionList exceptions,
ContextList ctx_list
)
{
if (orb instanceof OrbFunctional)
{
((OrbFunctional) orb).ensureRunning();
}
gnuRequest g = new gnuRequest();
g.setORB(orb);
g.setOperation(operation);
g.setIor(ior);
g.m_target = target;
g.ctx(context);
g.set_args(parameters);
g.set_exceptions(exceptions);
g.set_context_list(ctx_list);
if (returns != null)
g.set_result(returns);
return g;
}
gnuClientRequestInfo.java 文件源码
项目:jvm-stm
阅读 26
收藏 0
点赞 0
评论 0
/** @inheritDoc */
public TypeCode[] exceptions()
{
request.checkDii();
ExceptionList ex = request.exceptions();
TypeCode[] et = new TypeCode[ ex.count() ];
try
{
for (int i = 0; i < et.length; i++)
{
et [ i ] = ex.item(i);
}
}
catch (Bounds e)
{
throw new Unexpected(e);
}
return et;
}
IorDelegate.java 文件源码
项目:jvm-stm
阅读 27
收藏 0
点赞 0
评论 0
/**
* Creates the request to invoke the method on this object.
*
* @param target the object, for that the operation must be invoked.
* @param context context (null allowed)
* @param operation the method name
* @param parameters the method parameters
* @param returns the return value holder
*
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters, NamedValue returns,
ExceptionList exceptions, ContextList ctx_list
)
{
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
request.setOperation(operation);
request.set_args(parameters);
request.m_context = context;
request.set_result(returns);
request.set_exceptions(exceptions);
request.set_context_list(ctx_list);
request.setORB(orb);
return request;
}
RequestTest.java 文件源码
项目:JamVM-PH
阅读 34
收藏 0
点赞 0
评论 0
/**
* Test catching the user exception, thrown on the remote side.
*/
public void testUserException()
{
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
exList, null
);
rq.add_in_arg().insert_long(123);
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."
);
}
SimpleDelegate.java 文件源码
项目:JamVM-PH
阅读 26
收藏 0
点赞 0
评论 0
/**
* Create the request for the local call.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns, ExceptionList exceptions,
ContextList ctx_list
)
{
if (orb instanceof OrbFunctional)
{
((OrbFunctional) orb).ensureRunning();
}
gnuRequest g = new gnuRequest();
g.setORB(orb);
g.setOperation(operation);
g.setIor(ior);
g.m_target = target;
g.ctx(context);
g.set_args(parameters);
g.set_exceptions(exceptions);
g.set_context_list(ctx_list);
if (returns != null)
g.set_result(returns);
return g;
}
gnuClientRequestInfo.java 文件源码
项目:JamVM-PH
阅读 20
收藏 0
点赞 0
评论 0
/** @inheritDoc */
public TypeCode[] exceptions()
{
request.checkDii();
ExceptionList ex = request.exceptions();
TypeCode[] et = new TypeCode[ ex.count() ];
try
{
for (int i = 0; i < et.length; i++)
{
et [ i ] = ex.item(i);
}
}
catch (Bounds e)
{
throw new Unexpected(e);
}
return et;
}
IorDelegate.java 文件源码
项目:JamVM-PH
阅读 29
收藏 0
点赞 0
评论 0
/**
* Creates the request to invoke the method on this object.
*
* @param target the object, for that the operation must be invoked.
* @param context context (null allowed)
* @param operation the method name
* @param parameters the method parameters
* @param returns the return value holder
*
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters, NamedValue returns,
ExceptionList exceptions, ContextList ctx_list
)
{
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
request.setOperation(operation);
request.set_args(parameters);
request.m_context = context;
request.set_result(returns);
request.set_exceptions(exceptions);
request.set_context_list(ctx_list);
request.setORB(orb);
return request;
}
RequestTest.java 文件源码
项目:classpath
阅读 28
收藏 0
点赞 0
评论 0
/**
* Test catching the user exception, thrown on the remote side.
*/
public void testUserException()
{
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
exList, null
);
rq.add_in_arg().insert_long(123);
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."
);
}
SimpleDelegate.java 文件源码
项目:classpath
阅读 28
收藏 0
点赞 0
评论 0
/**
* Create the request for the local call.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters,
NamedValue returns, ExceptionList exceptions,
ContextList ctx_list
)
{
if (orb instanceof OrbFunctional)
{
((OrbFunctional) orb).ensureRunning();
}
gnuRequest g = new gnuRequest();
g.setORB(orb);
g.setOperation(operation);
g.setIor(ior);
g.m_target = target;
g.ctx(context);
g.set_args(parameters);
g.set_exceptions(exceptions);
g.set_context_list(ctx_list);
if (returns != null)
g.set_result(returns);
return g;
}
gnuClientRequestInfo.java 文件源码
项目:classpath
阅读 26
收藏 0
点赞 0
评论 0
/** @inheritDoc */
public TypeCode[] exceptions()
{
request.checkDii();
ExceptionList ex = request.exceptions();
TypeCode[] et = new TypeCode[ ex.count() ];
try
{
for (int i = 0; i < et.length; i++)
{
et [ i ] = ex.item(i);
}
}
catch (Bounds e)
{
throw new Unexpected(e);
}
return et;
}
IorDelegate.java 文件源码
项目:classpath
阅读 24
收藏 0
点赞 0
评论 0
/**
* Creates the request to invoke the method on this object.
*
* @param target the object, for that the operation must be invoked.
* @param context context (null allowed)
* @param operation the method name
* @param parameters the method parameters
* @param returns the return value holder
*
* @return the created request.
*/
public Request create_request(org.omg.CORBA.Object target, Context context,
String operation, NVList parameters, NamedValue returns,
ExceptionList exceptions, ContextList ctx_list
)
{
gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
request.setOperation(operation);
request.set_args(parameters);
request.m_context = context;
request.set_result(returns);
request.set_exceptions(exceptions);
request.set_context_list(ctx_list);
request.setORB(orb);
return request;
}
CorbaClientDelegateImpl.java 文件源码
项目:OpenJSharp
阅读 26
收藏 0
点赞 0
评论 0
public Request create_request(org.omg.CORBA.Object obj,
Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exclist,
ContextList ctxlist)
{
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
}
CorbaMessageMediatorImpl.java 文件源码
项目:OpenJSharp
阅读 32
收藏 0
点赞 0
评论 0
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
if (! isDIIRequest()) {
return null;
}
ExceptionList _exceptions = diiRequest.exceptions();
try {
// Find the typecode for the exception
for (int i=0; i<_exceptions.count() ; i++) {
TypeCode tc = _exceptions.item(i);
if ( tc.id().equals(repoId) ) {
// Since we dont have the actual user exception
// class, the spec says we have to create an
// UnknownUserException and put it in the
// environment.
Any eany = orb.create_any();
eany.read_value(is, (TypeCode)tc);
return new UnknownUserException(eany);
}
}
} catch (Exception b) {
throw wrapper.unexpectedDiiException(b);
}
// must be a truly unknown exception
return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
ClientRequestInfoImpl.java 文件源码
项目:OpenJSharp
阅读 26
收藏 0
点赞 0
评论 0
/**
* See RequestInfoImpl for javadoc.
*/
public TypeCode[] exceptions (){
checkAccess( MID_EXCEPTIONS );
if( cachedExceptions == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported2() ;
}
// Get the list of exceptions from DII request data, If there are
// no exceptions raised then this method will return null.
ExceptionList excList = request.exceptions( );
int count = excList.count();
TypeCode[] excTCList = new TypeCode[count];
try {
for( int i = 0; i < count; i++ ) {
excTCList[i] = excList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInExceptions( e ) ;
}
cachedExceptions = excTCList;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the TypeCode[] array. We also assume
// they will not change the values of the containing TypeCodes.
return cachedExceptions;
}
CorbaClientDelegateImpl.java 文件源码
项目:openjdk-jdk10
阅读 27
收藏 0
点赞 0
评论 0
public Request create_request(org.omg.CORBA.Object obj,
Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exclist,
ContextList ctxlist)
{
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
}
CorbaMessageMediatorImpl.java 文件源码
项目:openjdk-jdk10
阅读 25
收藏 0
点赞 0
评论 0
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
if (! isDIIRequest()) {
return null;
}
ExceptionList _exceptions = diiRequest.exceptions();
try {
// Find the typecode for the exception
for (int i=0; i<_exceptions.count() ; i++) {
TypeCode tc = _exceptions.item(i);
if ( tc.id().equals(repoId) ) {
// Since we dont have the actual user exception
// class, the spec says we have to create an
// UnknownUserException and put it in the
// environment.
Any eany = orb.create_any();
eany.read_value(is, (TypeCode)tc);
return new UnknownUserException(eany);
}
}
} catch (Exception b) {
throw wrapper.unexpectedDiiException(b);
}
// must be a truly unknown exception
return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
ClientRequestInfoImpl.java 文件源码
项目:openjdk-jdk10
阅读 21
收藏 0
点赞 0
评论 0
/**
* See RequestInfoImpl for javadoc.
*/
public TypeCode[] exceptions (){
checkAccess( MID_EXCEPTIONS );
if( cachedExceptions == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported2() ;
}
// Get the list of exceptions from DII request data, If there are
// no exceptions raised then this method will return null.
ExceptionList excList = request.exceptions( );
int count = excList.count();
TypeCode[] excTCList = new TypeCode[count];
try {
for( int i = 0; i < count; i++ ) {
excTCList[i] = excList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInExceptions( e ) ;
}
cachedExceptions = excTCList;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the TypeCode[] array. We also assume
// they will not change the values of the containing TypeCodes.
return cachedExceptions;
}
CorbaClientDelegateImpl.java 文件源码
项目:openjdk9
阅读 23
收藏 0
点赞 0
评论 0
public Request create_request(org.omg.CORBA.Object obj,
Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exclist,
ContextList ctxlist)
{
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
}
CorbaMessageMediatorImpl.java 文件源码
项目:openjdk9
阅读 28
收藏 0
点赞 0
评论 0
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
if (! isDIIRequest()) {
return null;
}
ExceptionList _exceptions = diiRequest.exceptions();
try {
// Find the typecode for the exception
for (int i=0; i<_exceptions.count() ; i++) {
TypeCode tc = _exceptions.item(i);
if ( tc.id().equals(repoId) ) {
// Since we dont have the actual user exception
// class, the spec says we have to create an
// UnknownUserException and put it in the
// environment.
Any eany = orb.create_any();
eany.read_value(is, (TypeCode)tc);
return new UnknownUserException(eany);
}
}
} catch (Exception b) {
throw wrapper.unexpectedDiiException(b);
}
// must be a truly unknown exception
return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
ClientRequestInfoImpl.java 文件源码
项目:openjdk9
阅读 24
收藏 0
点赞 0
评论 0
/**
* See RequestInfoImpl for javadoc.
*/
public TypeCode[] exceptions (){
checkAccess( MID_EXCEPTIONS );
if( cachedExceptions == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported2() ;
}
// Get the list of exceptions from DII request data, If there are
// no exceptions raised then this method will return null.
ExceptionList excList = request.exceptions( );
int count = excList.count();
TypeCode[] excTCList = new TypeCode[count];
try {
for( int i = 0; i < count; i++ ) {
excTCList[i] = excList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInExceptions( e ) ;
}
cachedExceptions = excTCList;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the TypeCode[] array. We also assume
// they will not change the values of the containing TypeCodes.
return cachedExceptions;
}
CorbaClientDelegateImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 27
收藏 0
点赞 0
评论 0
public Request create_request(org.omg.CORBA.Object obj,
Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exclist,
ContextList ctxlist)
{
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
}
CorbaMessageMediatorImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 30
收藏 0
点赞 0
评论 0
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
if (! isDIIRequest()) {
return null;
}
ExceptionList _exceptions = diiRequest.exceptions();
try {
// Find the typecode for the exception
for (int i=0; i<_exceptions.count() ; i++) {
TypeCode tc = _exceptions.item(i);
if ( tc.id().equals(repoId) ) {
// Since we dont have the actual user exception
// class, the spec says we have to create an
// UnknownUserException and put it in the
// environment.
Any eany = orb.create_any();
eany.read_value(is, (TypeCode)tc);
return new UnknownUserException(eany);
}
}
} catch (Exception b) {
throw wrapper.unexpectedDiiException(b);
}
// must be a truly unknown exception
return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
ClientRequestInfoImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 23
收藏 0
点赞 0
评论 0
/**
* See RequestInfoImpl for javadoc.
*/
public TypeCode[] exceptions (){
checkAccess( MID_EXCEPTIONS );
if( cachedExceptions == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported2() ;
}
// Get the list of exceptions from DII request data, If there are
// no exceptions raised then this method will return null.
ExceptionList excList = request.exceptions( );
int count = excList.count();
TypeCode[] excTCList = new TypeCode[count];
try {
for( int i = 0; i < count; i++ ) {
excTCList[i] = excList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInExceptions( e ) ;
}
cachedExceptions = excTCList;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the TypeCode[] array. We also assume
// they will not change the values of the containing TypeCodes.
return cachedExceptions;
}
CorbaClientDelegateImpl.java 文件源码
项目:jdk8u_corba
阅读 24
收藏 0
点赞 0
评论 0
public Request create_request(org.omg.CORBA.Object obj,
Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exclist,
ContextList ctxlist)
{
return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
exclist, ctxlist);
}
CorbaMessageMediatorImpl.java 文件源码
项目:jdk8u_corba
阅读 36
收藏 0
点赞 0
评论 0
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
if (! isDIIRequest()) {
return null;
}
ExceptionList _exceptions = diiRequest.exceptions();
try {
// Find the typecode for the exception
for (int i=0; i<_exceptions.count() ; i++) {
TypeCode tc = _exceptions.item(i);
if ( tc.id().equals(repoId) ) {
// Since we dont have the actual user exception
// class, the spec says we have to create an
// UnknownUserException and put it in the
// environment.
Any eany = orb.create_any();
eany.read_value(is, (TypeCode)tc);
return new UnknownUserException(eany);
}
}
} catch (Exception b) {
throw wrapper.unexpectedDiiException(b);
}
// must be a truly unknown exception
return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}