38 |
|
|
39 |
package org.omg.PortableServer; |
package org.omg.PortableServer; |
40 |
|
|
41 |
|
import gnu.CORBA.Minor; |
42 |
|
|
43 |
import org.omg.CORBA.Any; |
import org.omg.CORBA.Any; |
44 |
|
import org.omg.CORBA.BAD_OPERATION; |
45 |
import org.omg.CORBA.BAD_PARAM; |
import org.omg.CORBA.BAD_PARAM; |
46 |
import org.omg.CORBA.MARSHAL; |
import org.omg.CORBA.MARSHAL; |
47 |
import org.omg.CORBA.ORB; |
import org.omg.CORBA.ORB; |
115 |
throw bad; |
throw bad; |
116 |
} |
} |
117 |
} |
} |
118 |
|
|
119 |
|
/** |
120 |
|
* Narrow the given object to the ServantActivator. For the objects that are |
121 |
|
* always local, this operation does not differ from the ordinary |
122 |
|
* {@link #narrow} (ClassCastException will be thrown if narrowing something |
123 |
|
* different). |
124 |
|
* |
125 |
|
* @param obj the object to cast. |
126 |
|
* |
127 |
|
* @return the casted ServantActivator. |
128 |
|
* |
129 |
|
* @since 1.5 |
130 |
|
* |
131 |
|
* @see OMG issue 4158. |
132 |
|
*/ |
133 |
|
public static ServantActivator unchecked_narrow(org.omg.CORBA.Object obj) |
134 |
|
{ |
135 |
|
return narrow(obj); |
136 |
|
} |
137 |
|
|
138 |
|
|
139 |
/** |
/** |
140 |
* This should read the servant activator, but it cannot be transferred |
* This should read the servant activator, but it cannot be transferred |
148 |
*/ |
*/ |
149 |
public static ServantActivator read(InputStream input) |
public static ServantActivator read(InputStream input) |
150 |
{ |
{ |
151 |
throw new MARSHAL(); |
MARSHAL m = new MARSHAL("Inappropriate"); |
152 |
|
m.minor = Minor.Inappropriate; |
153 |
|
throw m; |
154 |
} |
} |
155 |
|
|
156 |
/** |
/** |
165 |
*/ |
*/ |
166 |
public static void write(OutputStream output, ServantActivator value) |
public static void write(OutputStream output, ServantActivator value) |
167 |
{ |
{ |
168 |
throw new MARSHAL(); |
MARSHAL m = new MARSHAL("Inappropriate"); |
169 |
|
m.minor = Minor.Inappropriate; |
170 |
|
throw m; |
171 |
} |
} |
172 |
} |
} |