下面列出了怎么用org.omg.CORBA.ContextList的API类实例代码及写法,或者点击链接到github查看源代码。
public Request getRequest(CorbaMessage message,
String opName,
org.omg.CORBA.NVList nvlist,
org.omg.CORBA.NamedValue ret,
org.omg.CORBA.ExceptionList exList)
throws Exception {
Request request = null;
if (orb == null) {
prepareOrb();
}
ContextList ctxList = orb.create_context_list();
Context ctx = null;
try {
ctx = orb.get_default_context();
} catch (Exception ex) {
//ignore?
}
org.omg.CORBA.Object targetObj =
(org.omg.CORBA.Object)message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT);
if (targetObj != null) {
request = targetObj._create_request(ctx, opName, nvlist, ret, exList, ctxList);
}
return request;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
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);
}
/**
* See RequestInfoImpl for javadoc.
*/
public String[] contexts (){
checkAccess( MID_CONTEXTS );
if( cachedContexts == null ) {
if( request == null ) {
throw stdWrapper.piOperationNotSupported3() ;
}
// Get the list of contexts from DII request data, If there are
// no contexts then this method will return null.
ContextList ctxList = request.contexts( );
int count = ctxList.count();
String[] ctxListToReturn = new String[count];
try {
for( int i = 0; i < count; i++ ) {
ctxListToReturn[i] = ctxList.item( i );
}
} catch( Exception e ) {
throw wrapper.exceptionInContexts( e ) ;
}
cachedContexts = ctxListToReturn;
}
// Good citizen: In the interest of efficiency, we assume
// interceptors will be "good citizens" in that they will not
// modify the contents of the String[] array.
return cachedContexts;
}
public ContextList contexts()
{
return _ctxList;
}
public RequestImpl (ORB orb,
org.omg.CORBA.Object targetObject,
Context ctx,
String operationName,
NVList argumentList,
NamedValue resultContainer,
ExceptionList exceptionList,
ContextList ctxList)
{
// initialize the orb
_orb = orb;
_wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.OA_INVOCATION ) ;
// initialize target, context and operation name
_target = targetObject;
_ctx = ctx;
_opName = operationName;
// initialize argument list if not passed in
if (argumentList == null)
_arguments = new NVListImpl(_orb);
else
_arguments = argumentList;
// set result container.
_result = resultContainer;
// initialize exception list if not passed in
if (exceptionList == null)
_exceptions = new ExceptionListImpl();
else
_exceptions = exceptionList;
// initialize context list if not passed in
if (ctxList == null)
_ctxList = new ContextListImpl(_orb);
else
_ctxList = ctxList;
// initialize environment
_env = new EnvironmentImpl();
}
public ContextList contexts()
{
return _ctxList;
}
/**
* Create a ContextList
*
* @result ContextList created
*/
public synchronized org.omg.CORBA.ContextList create_context_list()
{
checkShutdownState();
return new ContextListImpl(this);
}
public org.omg.CORBA.ContextList create_context_list() {
return new ContextListImpl(this);
}
public RequestImpl (ORB orb,
org.omg.CORBA.Object targetObject,
Context ctx,
String operationName,
NVList argumentList,
NamedValue resultContainer,
ExceptionList exceptionList,
ContextList ctxList)
{
// initialize the orb
_orb = orb;
_wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.OA_INVOCATION ) ;
// initialize target, context and operation name
_target = targetObject;
_ctx = ctx;
_opName = operationName;
// initialize argument list if not passed in
if (argumentList == null)
_arguments = new NVListImpl(_orb);
else
_arguments = argumentList;
// set result container.
_result = resultContainer;
// initialize exception list if not passed in
if (exceptionList == null)
_exceptions = new ExceptionListImpl();
else
_exceptions = exceptionList;
// initialize context list if not passed in
if (ctxList == null)
_ctxList = new ContextListImpl(_orb);
else
_ctxList = ctxList;
// initialize environment
_env = new EnvironmentImpl();
}
public ContextList contexts()
{
return _ctxList;
}
public Request _create_request( Context ctx, String operation, NVList arg_list,
NamedValue result, ExceptionList exclist, ContextList ctxlist)
{
return object._create_request( ctx, operation, arg_list, result,
exclist, ctxlist ) ;
}
public RequestImpl (ORB orb,
org.omg.CORBA.Object targetObject,
Context ctx,
String operationName,
NVList argumentList,
NamedValue resultContainer,
ExceptionList exceptionList,
ContextList ctxList)
{
// initialize the orb
_orb = orb;
_wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.OA_INVOCATION ) ;
// initialize target, context and operation name
_target = targetObject;
_ctx = ctx;
_opName = operationName;
// initialize argument list if not passed in
if (argumentList == null)
_arguments = new NVListImpl(_orb);
else
_arguments = argumentList;
// set result container.
_result = resultContainer;
// initialize exception list if not passed in
if (exceptionList == null)
_exceptions = new ExceptionListImpl();
else
_exceptions = exceptionList;
// initialize context list if not passed in
if (ctxList == null)
_ctxList = new ContextListImpl(_orb);
else
_ctxList = ctxList;
// initialize environment
_env = new EnvironmentImpl();
}
public ContextList contexts()
{
return _ctxList;
}
/**
* Create a ContextList
*
* @result ContextList created
*/
public synchronized org.omg.CORBA.ContextList create_context_list()
{
checkShutdownState();
return new ContextListImpl(this);
}