diff options
author | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-10-22 17:47:03 +0000 |
---|---|---|
committer | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-10-22 17:47:03 +0000 |
commit | f715210b996de402d316909e4cf27abf4daab88f (patch) | |
tree | 7f526f5558f42053a9a99fe6139b508d4245e10c /gnu | |
parent | 337635bda24d7d95993a0ba519ba92923b96268b (diff) | |
download | classpath-f715210b996de402d316909e4cf27abf4daab88f.tar.gz |
2005-10-22 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* javax/rmi/CORBA/ValueHandlerMultiFormat.java: New interface.
* gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java
(getMaximumStreamFormatVersion, writeValue): New methods.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java b/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java index 0c5375ca8..dbfcf2f5c 100644 --- a/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java +++ b/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java @@ -40,7 +40,9 @@ package gnu.javax.rmi.CORBA; import gnu.CORBA.CDR.gnuRuntime; +import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.CustomMarshal; +import org.omg.CORBA.portable.OutputStream; import org.omg.CORBA.portable.Streamable; import org.omg.SendingContext.RunTime; @@ -50,6 +52,7 @@ import java.io.Serializable; import java.rmi.Remote; import javax.rmi.CORBA.ValueHandler; +import javax.rmi.CORBA.ValueHandlerMultiFormat; /** * Implementation of the ValueHandler. @@ -58,8 +61,30 @@ import javax.rmi.CORBA.ValueHandler; */ public class ValueHandlerDelegateImpl extends gnuRmiUtil - implements ValueHandler + implements ValueHandler, ValueHandlerMultiFormat { + /** + * Return the maximal supported stream format version. We currently + * support the version 1. + * + * TODO Support the version 2. + */ + public byte getMaximumStreamFormatVersion() + { + return 1; + } + + /** + * Write value using the given stream format version. + */ + public void writeValue(OutputStream output, Serializable value, byte version) + { + if (version!=1) + throw new BAD_PARAM("Unsupported stream format version "+version); + else + writeValue(output, value); + } + /** * This implementation associates RunTime with stream rather than with the * value handler and this method is not used in the implementation. It is |