本文整理汇总了Java中org.omg.CORBA.portable.ApplicationException类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationException类的具体用法?Java ApplicationException怎么用?Java ApplicationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationException类属于org.omg.CORBA.portable包,在下文中一共展示了ApplicationException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readException
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
public Exception readException( 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 ) ;
}
示例2: sayHello
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/**
* One way call of the remote method.
*/
public void sayHello()
{
InputStream in = null;
try
{
// As we do not expect any response, the second
// parameter is 'false'.
OutputStream out = _request("sayHello", false);
in = _invoke(out);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
throw new MARSHAL(ex.getId());
}
catch (RemarshalException _rm)
{
sayHello();
}
finally
{
_releaseReply(in);
}
}
示例3: theField
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/**
* Set the field value.
*/
public void theField(int newTheField)
{
InputStream in = null;
try
{
// The special name of operation instructs just to set
// the field value rather than calling the method.
OutputStream out = _request("_set_theField", true);
out.write_long(newTheField);
in = _invoke(out);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
throw new MARSHAL(ex.getId());
}
catch (RemarshalException _rm)
{
theField(newTheField);
}
finally
{
_releaseReply(in);
}
}
示例4: destroy
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public void destroy()
{
InputStream input = null;
try
{
OutputStream output = _request("destroy", true);
input = _invoke(output);
}
catch (ApplicationException ex)
{
input = ex.getInputStream();
String id = ex.getId();
throw new MARSHAL(id);
}
catch (RemarshalException remarsh)
{
destroy();
}
finally
{
_releaseReply(input);
}
}
示例5: copy
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public Policy copy()
{
InputStream input = null;
try
{
OutputStream output = _request("copy", true);
input = _invoke(output);
return PolicyHelper.read(input);
}
catch (ApplicationException ex)
{
input = ex.getInputStream();
String id = ex.getId();
throw new MARSHAL(id);
}
catch (RemarshalException remarsh)
{
return copy();
}
finally
{
_releaseReply(input);
}
}
示例6: def_kind
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/**
* Get the definition kind of the remote IDL type object. The method is
* written following OMG specification, treating the typecode
* as a read only attribute rather than a method. This means,
* the operation name is "_get_def_kind".
*
* @return a definition kind, returned by remote IDL type object.
*/
public DefinitionKind def_kind()
{
InputStream in = null;
try
{
OutputStream out = _request("_get_def_kind", true);
in = _invoke(out);
return DefinitionKindHelper.read(in);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
throw new org.omg.CORBA.MARSHAL(ex.getId());
}
catch (RemarshalException rex)
{
return def_kind();
}
finally
{
_releaseReply(in);
}
}
示例7: destroy
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/**
* Destroy the remote IDL type object.
*/
public void destroy()
{
InputStream in = null;
try
{
OutputStream out = _request("destroy", true);
in = _invoke(out);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
throw new org.omg.CORBA.MARSHAL(ex.getId());
}
catch (RemarshalException rex)
{
destroy();
}
finally
{
_releaseReply(in);
}
}
示例8: new_context
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public NamingContext new_context()
{
InputStream in = null;
try
{
OutputStream out = _request("new_context", true);
in = _invoke(out);
NamingContext __result = NamingContextHelper.read(in);
return __result;
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
throw new MARSHAL(ex.getId());
}
catch (RemarshalException remarsh)
{
return new_context();
}
finally
{
_releaseReply(in);
}
}
示例9: components_established
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public void components_established(IORInfo info)
{
InputStream input = null;
try
{
OutputStream output = _request("components_established", true);
output.write_Object(info);
input = _invoke(output);
}
catch (ApplicationException ex)
{
input = ex.getInputStream();
String id = ex.getId();
throw new MARSHAL(id);
}
catch (RemarshalException remarsh)
{
components_established(info);
}
finally
{
_releaseReply(input);
}
}
示例10: establish_components
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public void establish_components(IORInfo info)
{
InputStream input = null;
try
{
OutputStream output = _request("establish_components", true);
output.write_Object(info);
input = _invoke(output);
}
catch (ApplicationException ex)
{
input = ex.getInputStream();
String id = ex.getId();
throw new MARSHAL(id);
}
catch (RemarshalException remarsh)
{
establish_components(info);
}
finally
{
_releaseReply(input);
}
}
示例11: destroy
import org.omg.CORBA.portable.ApplicationException; //导入依赖的package包/类
/** {@inheritDoc} */
public void destroy()
{
InputStream input = null;
try
{
OutputStream output = _request("destroy", true);
input = _invoke(output);
}
catch (ApplicationException ex)
{
input = ex.getInputStream();
String id = ex.getId();
throw new MARSHAL(id);
}
catch (RemarshalException remarsh)
{
destroy();
}
finally
{
_releaseReply(input);
}
}