blob: dfa4d2845df8bda89cdc2442157e1cde16c7026e [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package test.obv;
//
// IDL:TestInterface:1.0
//
public abstract class TestInterfacePOA
extends org.omg.PortableServer.Servant
implements org.omg.CORBA.portable.InvokeHandler,
TestInterfaceOperations
{
static final String[] _ob_ids_ =
{
"IDL:TestInterface:1.0",
};
public TestInterface
_this()
{
return TestInterfaceHelper.narrow(super._this_object());
}
public TestInterface
_this(org.omg.CORBA.ORB orb)
{
return TestInterfaceHelper.narrow(super._this_object(orb));
}
public String[]
_all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId)
{
return _ob_ids_;
}
public org.omg.CORBA.portable.OutputStream
_invoke(String opName,
org.omg.CORBA.portable.InputStream in,
org.omg.CORBA.portable.ResponseHandler handler)
{
final String[] _ob_names =
{
"get_count"
};
int _ob_left = 0;
int _ob_right = _ob_names.length;
int _ob_index = -1;
while(_ob_left < _ob_right)
{
int _ob_m = (_ob_left + _ob_right) / 2;
int _ob_res = _ob_names[_ob_m].compareTo(opName);
if(_ob_res == 0)
{
_ob_index = _ob_m;
break;
}
else if(_ob_res > 0)
_ob_right = _ob_m;
else
_ob_left = _ob_m + 1;
}
if(_ob_index == -1 && opName.charAt(0) == '_')
{
_ob_left = 0;
_ob_right = _ob_names.length;
String _ob_ami_op =
opName.substring(1);
while(_ob_left < _ob_right)
{
int _ob_m = (_ob_left + _ob_right) / 2;
int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op);
if(_ob_res == 0)
{
_ob_index = _ob_m;
break;
}
else if(_ob_res > 0)
_ob_right = _ob_m;
else
_ob_left = _ob_m + 1;
}
}
switch(_ob_index)
{
case 0: // get_count
return _OB_op_get_count(in, handler);
}
throw new org.omg.CORBA.BAD_OPERATION();
}
private org.omg.CORBA.portable.OutputStream
_OB_op_get_count(org.omg.CORBA.portable.InputStream in,
org.omg.CORBA.portable.ResponseHandler handler)
{
org.omg.CORBA.portable.OutputStream out = null;
int _ob_r = get_count();
out = handler.createReply();
out.write_long(_ob_r);
return out;
}
}