38 |
|
|
39 |
package org.omg.PortableInterceptor; |
package org.omg.PortableInterceptor; |
40 |
|
|
41 |
|
import gnu.CORBA.Minor; |
42 |
|
|
43 |
import org.omg.CORBA.Any; |
import org.omg.CORBA.Any; |
44 |
import org.omg.CORBA.BAD_PARAM; |
import org.omg.CORBA.BAD_PARAM; |
45 |
import org.omg.CORBA.MARSHAL; |
import org.omg.CORBA.MARSHAL; |
47 |
import org.omg.CORBA.TypeCode; |
import org.omg.CORBA.TypeCode; |
48 |
import org.omg.CORBA.portable.InputStream; |
import org.omg.CORBA.portable.InputStream; |
49 |
import org.omg.CORBA.portable.OutputStream; |
import org.omg.CORBA.portable.OutputStream; |
50 |
|
import org.omg.PortableServer.ServantActivator; |
51 |
|
|
52 |
/** |
/** |
53 |
* The helper operations for the CORBA object {@link Current}. |
* The helper operations for the CORBA object {@link Current}. |
126 |
throw new BAD_PARAM("Not a Current"); |
throw new BAD_PARAM("Not a Current"); |
127 |
} |
} |
128 |
} |
} |
129 |
|
|
130 |
|
/** |
131 |
|
* Narrow the given object to the Current. For the objects that are |
132 |
|
* always local, this operation does not differ from the ordinary |
133 |
|
* {@link #narrow} (ClassCastException will be thrown if narrowing something |
134 |
|
* different). |
135 |
|
* |
136 |
|
* @param obj the object to cast. |
137 |
|
* |
138 |
|
* @return the casted Current. |
139 |
|
* |
140 |
|
* @since 1.5 |
141 |
|
* |
142 |
|
* @see OMG issue 4158. |
143 |
|
*/ |
144 |
|
public static Current unchecked_narrow(org.omg.CORBA.Object obj) |
145 |
|
{ |
146 |
|
return narrow(obj); |
147 |
|
} |
148 |
|
|
149 |
/** |
/** |
150 |
* Not supported for compatibility reasons. |
* Not supported for compatibility reasons. |
155 |
*/ |
*/ |
156 |
public static Current read(InputStream input) |
public static Current read(InputStream input) |
157 |
{ |
{ |
158 |
throw new MARSHAL(); |
MARSHAL m = new MARSHAL("Inappropriate"); |
159 |
|
m.minor = Minor.Inappropriate; |
160 |
|
throw m; |
161 |
} |
} |
162 |
|
|
163 |
/** |
/** |
169 |
*/ |
*/ |
170 |
public static void write(OutputStream output, Current value) |
public static void write(OutputStream output, Current value) |
171 |
{ |
{ |
172 |
throw new MARSHAL(); |
MARSHAL m = new MARSHAL("Inappropriate"); |
173 |
|
m.minor = Minor.Inappropriate; |
174 |
|
throw m; |
175 |
} |
} |
176 |
} |
} |