本文整理汇总了Java中org.omg.IOP.ServiceContext类的典型用法代码示例。如果您正苦于以下问题:Java ServiceContext类的具体用法?Java ServiceContext怎么用?Java ServiceContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServiceContext类属于org.omg.IOP包,在下文中一共展示了ServiceContext类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* See ServerRequestInfo for javadocs.
*/
public org.omg.IOP.ServiceContext get_request_service_context( int id ) {
checkAccess( MID_GET_REQUEST_SERVICE_CONTEXT );
if( cachedRequestServiceContexts == null ) {
cachedRequestServiceContexts = new HashMap();
}
return getServiceContext( cachedRequestServiceContexts,
request.getRequestServiceContexts(), id );
}
示例2: get_reply_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* See ServerRequestInfo for javadocs.
*/
public org.omg.IOP.ServiceContext get_reply_service_context( int id ) {
checkAccess( MID_GET_REPLY_SERVICE_CONTEXT );
if( cachedReplyServiceContexts == null ) {
cachedReplyServiceContexts = new HashMap();
}
return getServiceContext( cachedReplyServiceContexts,
replyMessage.getServiceContexts(), id );
}
示例3: add_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* Allows interceptors to add service contexts to the request.
* <p>
* There is no declaration of the order of the service contexts. They
* may or may not appear in the order they are added.
*/
public void add_request_service_context (ServiceContext service_context,
boolean replace)
{
checkAccess( MID_ADD_REQUEST_SERVICE_CONTEXT );
if( cachedRequestServiceContexts == null ) {
cachedRequestServiceContexts = new HashMap();
}
addServiceContext( cachedRequestServiceContexts,
messageMediator.getRequestServiceContexts(),
service_context, replace );
}
示例4: get_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* See RequestInfoImpl for javadoc.
*/
public org.omg.IOP.ServiceContext get_request_service_context( int id ) {
checkAccess( MID_GET_REQUEST_SERVICE_CONTEXT );
if( cachedRequestServiceContexts == null ) {
cachedRequestServiceContexts = new HashMap();
}
return getServiceContext(cachedRequestServiceContexts,
messageMediator.getRequestServiceContexts(),
id);
}
示例5: get_reply_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* does not contain an etry for that ID, BAD_PARAM with a minor code of
* TBD_BP is raised.
*/
public org.omg.IOP.ServiceContext get_reply_service_context( int id ) {
checkAccess( MID_GET_REPLY_SERVICE_CONTEXT );
if( cachedReplyServiceContexts == null ) {
cachedReplyServiceContexts = new HashMap();
}
// In the event this is called from a oneway, we will have no
// response object.
//
// In the event this is called after a IIOPConnection.purgeCalls,
// we will have a response object, but that object will
// not contain a header (which would hold the service context
// container). See bug 4624102.
//
// REVISIT: this is the only thing used
// from response at this time. However, a more general solution
// would avoid accessing other parts of response's header.
//
// Instead of throwing a NullPointer, we will
// "gracefully" handle these with a BAD_PARAM with minor code 25.
try {
ServiceContexts serviceContexts =
messageMediator.getReplyServiceContexts();
if (serviceContexts == null) {
throw new NullPointerException();
}
return getServiceContext(cachedReplyServiceContexts,
serviceContexts, id);
} catch (NullPointerException e) {
// REVISIT how this is programmed - not what it does.
// See purge calls test. The waiter is woken up by the
// call to purge calls - but there is no reply containing
// service contexts.
throw stdWrapper.invalidServiceContextId( e ) ;
}
}
示例6: add_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public void add_request_service_context(ServiceContext service_context,
boolean replace
)
{
request.add_request_service_context(service_context, replace);
}
示例7: add_reply_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public void add_reply_service_context(ServiceContext service_context,
boolean replace
)
{
m_reply_header.addContext(service_context, replace);
}
示例8: get_reply_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public ServiceContext get_reply_service_context(int ctx_name)
throws BAD_PARAM
{
return gnu.CORBA.GIOP.ServiceContext.findContext(ctx_name,
m_reply_header.service_context
);
}
示例9: get_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public ServiceContext get_request_service_context(int ctx_name)
throws BAD_PARAM
{
return gnu.CORBA.GIOP.ServiceContext.findContext(ctx_name,
m_request_header.service_context
);
}
示例10: add_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/**
* Add context to request.
*/
public void add_request_service_context(ServiceContext service_context,
boolean replace
)
{
m_rqh.addContext(service_context, replace);
}
示例11: get_request_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public ServiceContext get_request_service_context(int ctx_name)
throws BAD_PARAM
{
return gnu.CORBA.GIOP.ServiceContext.findContext(ctx_name,
m_rqh.service_context
);
}
示例12: get_reply_service_context
import org.omg.IOP.ServiceContext; //导入依赖的package包/类
/** @inheritDoc */
public ServiceContext get_reply_service_context(int ctx_name)
throws BAD_PARAM
{
if (m_rph == null)
throw new BAD_INV_ORDER("Reply context not yet available");
return gnu.CORBA.GIOP.ServiceContext.findContext(ctx_name,
m_rph.service_context
);
}