//This file is automatically generated. DO NOT EDIT!
package com.robotraconteur.testing.TestService1;
import java.util.*;
import com.robotraconteur.*;
public class sub2_stub extends ServiceStub implements sub2, async_sub2 {
    public sub2_stub(WrappedServiceStub innerstub) {
        super(innerstub); 
    }
    public String get_s_ind() {
    return MessageElementUtil.unpackString(rr_innerstub.propertyGet("s_ind"));
    }
    public void set_s_ind(String value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_innerstub.propertySet("s_ind", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public int get_i_ind() {
    return (MessageElementUtil.<int[]>castDataAndDispose(rr_innerstub.propertyGet("i_ind")))[0];
    }
    public void set_i_ind(int value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<int[]>packArray("value",new int[] {value});
    rr_innerstub.propertySet("i_ind", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public String get_data() {
    return MessageElementUtil.unpackString(rr_innerstub.propertyGet("data"));
    }
    public void set_data(String value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_innerstub.propertySet("data", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public void dispatchEvent(String rr_membername, vectorptr_messageelement rr_m) {
    }
    public sub3 get_o3_1(String ind) {
    return (sub3)findObjRefTyped("o3_1",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub3");
    }
    public MessageElement callbackCall(String rr_membername, vectorptr_messageelement rr_m) {
    throw new MemberNotFoundException("Member not found");
    }
    public void async_get_s_ind(Action2<String,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("s_ind",new rrend_async_get_s_ind(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_s_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<String,RuntimeException> rr_handler=(Action2<String,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action("",err);
    return;
    }
    String rr_ret;
    try {
    rr_ret=MessageElementUtil.unpackString(value);
    } catch (RuntimeException err2) {
    rr_handler.action("",err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_s_ind(String value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_async_PropertySet("s_ind",m,new rrend_async_set_s_ind(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_s_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_i_ind(Action2<Integer,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("i_ind",new rrend_async_get_i_ind(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_i_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<Integer,RuntimeException> rr_handler=(Action2<Integer,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action((int)0,err);
    return;
    }
    Integer rr_ret;
    try {
    rr_ret=(MessageElementUtil.<int[]>castDataAndDispose(value))[0];
    } catch (RuntimeException err2) {
    rr_handler.action((int)0,err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_i_ind(int value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<int[]>packArray("value",new int[] {value});
    rr_async_PropertySet("i_ind",m,new rrend_async_set_i_ind(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_i_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_data(Action2<String,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("data",new rrend_async_get_data(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_data implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<String,RuntimeException> rr_handler=(Action2<String,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action("",err);
    return;
    }
    String rr_ret;
    try {
    rr_ret=MessageElementUtil.unpackString(value);
    } catch (RuntimeException err2) {
    rr_handler.action("",err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_data(String value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_async_PropertySet("data",m,new rrend_async_set_data(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_data implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_o3_1(String ind, Action2<sub3,RuntimeException> handler, int timeout) {
    asyncFindObjRefTyped("o3_1",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub3",handler,timeout);
    }
}
