本文整理汇总了Java中org.omg.PortableServer.ForwardRequest类的典型用法代码示例。如果您正苦于以下问题:Java ForwardRequest类的具体用法?Java ForwardRequest怎么用?Java ForwardRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ForwardRequest类属于org.omg.PortableServer包,在下文中一共展示了ForwardRequest类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preinvoke
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
public Servant preinvoke(byte[] oid, POA adapter, String operation,
CookieHolder cookie) throws ForwardRequest
{
String objKey = new String(oid);
Servant servant = (Servant) contexts.get(objKey);
if (servant == null)
{
servant = readInContext(objKey);
}
return servant;
}
示例2: internalGetServant
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
protected java.lang.Object internalGetServant( byte[] id,
String operation ) throws ForwardRequest
{
if (defaultServant == null)
throw poa.invocationWrapper().poaNoDefaultServant() ;
return defaultServant;
}
示例3: getInvocationServant
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
public void getInvocationServant( OAInvocationInfo info )
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this,
"Calling getInvocationServant on poa " + this ) ;
}
java.lang.Object servant = null ;
try {
servant = mediator.getInvocationServant( info.id(),
info.getOperation() );
} catch (ForwardRequest freq) {
throw new ForwardException( getORB(), freq.forward_reference ) ;
}
info.setServant( servant ) ;
} finally {
if (debug) {
ORBUtility.dprint( this,
"Exiting getInvocationServant on poa " + this ) ;
}
unlock() ;
}
}
示例4: internalGetServant
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
protected java.lang.Object internalGetServant( byte[] id,
String operation ) throws ForwardRequest
{
Servant servant = internalIdToServant( id ) ;
if (servant == null)
servant = defaultServant ;
if (servant == null)
throw poa.invocationWrapper().poaNoDefaultServant() ;
return servant ;
}
示例5: getInvocationServant
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
public final java.lang.Object getInvocationServant( byte[] id,
String operation ) throws ForwardRequest
{
java.lang.Object result = internalGetServant( id, operation ) ;
return result ;
}
示例6: extract
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
/**
* Extract the ForwardRequest from given Any.
* This method uses the ForwardRequestHolder.
*
* @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
*/
public static ForwardRequest extract(Any any)
{
try
{
return ((ForwardRequestHolder) any.extract_Streamable()).value;
}
catch (ClassCastException cex)
{
BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
bad.minor = Minor.Any;
bad.initCause(cex);
throw bad;
}
}
示例7: read
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
/**
* Read the exception from the CDR intput stream.
*
* @param input a org.omg.CORBA.portable stream to read from.
*/
public static ForwardRequest read(InputStream input)
{
// Read the exception repository id.
String id = input.read_string();
ForwardRequest value = new ForwardRequest();
value.forward_reference = input.read_Object();
return value;
}
示例8: write
import org.omg.PortableServer.ForwardRequest; //导入依赖的package包/类
/**
* Write the exception to the CDR output stream.
*
* @param output a org.omg.CORBA.portable stream stream to write into.
* @param value a value to write.
*/
public static void write(OutputStream output, ForwardRequest value)
{
// Write the exception repository id.
output.write_string(id());
output.write_Object(value.forward_reference);
}