本文整理汇总了Java中org.omg.CORBA.MARSHAL类的典型用法代码示例。如果您正苦于以下问题:Java MARSHAL类的具体用法?Java MARSHAL怎么用?Java MARSHAL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MARSHAL类属于org.omg.CORBA包,在下文中一共展示了MARSHAL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read_any
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public Any read_any() {
Any any = orb.create_any();
TypeCodeImpl tc = new TypeCodeImpl(orb);
// read off the typecode
// REVISIT We could avoid this try-catch if we could peek the typecode
// kind off this stream and see if it is a tk_value. Looking at the
// code we know that for tk_value the Any.read_value() below
// ignores the tc argument anyway (except for the kind field).
// But still we would need to make sure that the whole typecode,
// including encapsulations, is read off.
try {
tc.read_value(parent);
} catch (MARSHAL ex) {
if (tc.kind().value() != TCKind._tk_value)
throw ex;
// We can be sure that the whole typecode encapsulation has been
// read off.
dprintThrowable(ex);
}
// read off the value of the any
any.read_value(parent, tc);
return any;
}
示例2: lookup_value_factory
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
/**
* Finds and returns a value factory for the given repository ID.
* The value factory returned was previously registered by a call to
* {@link #register_value_factory} or is the default factory.
*
* @param repositoryID the repository ID.
* @return the value factory.
* @exception org.omg.CORBA.BAD_PARAM if unable to locate a factory.
**/
public synchronized ValueFactory lookup_value_factory(String repositoryID)
{
checkShutdownState();
ValueFactory factory =
(ValueFactory)valueFactoryCache.get(repositoryID);
if (factory == null) {
try {
factory = Utility.getFactory(null, null, null, repositoryID);
} catch(org.omg.CORBA.MARSHAL ex) {
throw wrapper.unableFindValueFactory( ex ) ;
}
}
return factory ;
}
示例3: readFully
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public final void readFully(byte data[], int offset, int size) throws IOException{
// d11623 : implement readFully, required for serializing some core classes
try{
readObjectState.readData(this);
orbStream.read_octet_array(data, offset, size);
} catch (MARSHAL marshalException) {
handleOptionalDataMarshalException(marshalException, false);
throw marshalException;
} catch(Error e) {
IOException exc = new IOException(e.getMessage());
exc.initCause(e);
throw exc ;
}
}
示例4: read
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public final int read() throws IOException{
try{
readObjectState.readData(this);
return (orbStream.read_octet() << 0) & 0x000000FF;
} catch (MARSHAL marshalException) {
if (marshalException.minor
== OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) {
setState(IN_READ_OBJECT_NO_MORE_OPT_DATA);
return -1;
}
throw marshalException;
} catch(Error e) {
IOException exc = new IOException(e.getMessage());
exc.initCause(e) ;
throw exc ;
}
}
示例5: cannotMarshalBadTckind
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL cannotMarshalBadTckind( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( CANNOT_MARSHAL_BAD_TCKIND, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.cannotMarshalBadTckind",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
示例6: readBoolean
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public final boolean readBoolean() throws IOException{
try{
readObjectState.readData(this);
return orbStream.read_boolean();
} catch (MARSHAL marshalException) {
handleOptionalDataMarshalException(marshalException, false);
throw marshalException;
} catch(Error e) {
IOException exc = new IOException(e.getMessage());
exc.initCause(e);
throw exc ;
}
}
示例7: unableLocateValueFactory
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL unableLocateValueFactory( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( UNABLE_LOCATE_VALUE_FACTORY, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.FINE )) {
Object[] parameters = null ;
doLog( Level.FINE, "OMG.unableLocateValueFactory",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
示例8: readInt
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public final int readInt() throws IOException{
try{
readObjectState.readData(this);
return orbStream.read_long();
} catch (MARSHAL marshalException) {
handleOptionalDataMarshalException(marshalException, false);
throw marshalException;
} catch(Error e) {
IOException exc = new IOException(e.getMessage());
exc.initCause(e);
throw exc ;
}
}
示例9: unsupportedFormatVersion
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL unsupportedFormatVersion( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( UNSUPPORTED_FORMAT_VERSION, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.unsupportedFormatVersion",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
示例10: unableLocateValueHelper
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL unableLocateValueHelper( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( UNABLE_LOCATE_VALUE_HELPER, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "UTIL.unableLocateValueHelper",
parameters, UtilSystemException.class, exc ) ;
}
return exc ;
}
示例11: couldNotSkipBytes
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL couldNotSkipBytes( CompletionStatus cs, Throwable t, Object arg0, Object arg1) {
MARSHAL exc = new MARSHAL( COULD_NOT_SKIP_BYTES, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = new Object[2] ;
parameters[0] = arg0 ;
parameters[1] = arg1 ;
doLog( Level.WARNING, "ORBUTIL.couldNotSkipBytes",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
示例12: indirectionNotFound
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL indirectionNotFound( CompletionStatus cs, Throwable t, Object arg0) {
MARSHAL exc = new MARSHAL( INDIRECTION_NOT_FOUND, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.FINE )) {
Object[] parameters = new Object[1] ;
parameters[0] = arg0 ;
doLog( Level.FINE, "ORBUTIL.indirectionNotFound",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
示例13: characterOutofrange
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL characterOutofrange( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( CHARACTER_OUTOFRANGE, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.characterOutofrange",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
示例14: wcharBadGiopVersionSent
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL wcharBadGiopVersionSent( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( WCHAR_BAD_GIOP_VERSION_SENT, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.wcharBadGiopVersionSent",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
示例15: refTypeIndirType
import org.omg.CORBA.MARSHAL; //导入依赖的package包/类
public MARSHAL refTypeIndirType( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( REF_TYPE_INDIR_TYPE, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.refTypeIndirType",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}