001    package org.omg.CosTransactions;
002    
003    
004    /**
005     * Generated from IDL interface "NonTxTargetPolicy".
006     *
007     * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
008     * @version generated at Jun 18, 2012 10:37:00 AM
009     */
010    
011    public class _NonTxTargetPolicyStub
012            extends org.omg.CORBA.portable.ObjectImpl
013            implements org.omg.CosTransactions.NonTxTargetPolicy
014    {
015            private String[] ids = {"IDL:CosTransactions/NonTxTargetPolicy:1.0","IDL:CORBA/Policy:1.0"};
016            public String[] _ids()
017            {
018                    return ids;
019            }
020    
021            public final static java.lang.Class _opsClass = org.omg.CosTransactions.NonTxTargetPolicyOperations.class;
022            public short tpv()
023            {
024                    while(true)
025                    {
026                    if(! this._is_local())
027                    {
028                            org.omg.CORBA.portable.InputStream _is = null;
029                            try
030                            {
031                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_tpv",true);
032                                    _is = _invoke(_os);
033                                    return _is.read_ushort();
034                            }
035                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
036                            catch( org.omg.CORBA.portable.ApplicationException _ax )
037                            {
038                                    String _id = _ax.getId();
039                                    throw new RuntimeException("Unexpected exception " + _id );
040                            }
041                            finally
042                            {
043                                    this._releaseReply(_is);
044                            }
045                    }
046    
047                    else
048                    {
049                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_tpv", _opsClass);
050                    if( _so == null )
051                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
052                            NonTxTargetPolicyOperations _localServant = (NonTxTargetPolicyOperations)_so.servant;
053                            short _result;
054                    try
055                    {
056                            _result = _localServant.tpv();
057                    }
058                    finally
059                    {
060                            _servant_postinvoke(_so);
061                    }
062                    return _result;
063                    }
064                    }
065    
066            }
067    
068            public int policy_type()
069            {
070                    while(true)
071                    {
072                    if(! this._is_local())
073                    {
074                            org.omg.CORBA.portable.InputStream _is = null;
075                            try
076                            {
077                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_policy_type",true);
078                                    _is = _invoke(_os);
079                                    return _is.read_ulong();
080                            }
081                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
082                            catch( org.omg.CORBA.portable.ApplicationException _ax )
083                            {
084                                    String _id = _ax.getId();
085                                    throw new RuntimeException("Unexpected exception " + _id );
086                            }
087                            finally
088                            {
089                                    this._releaseReply(_is);
090                            }
091                    }
092    
093                    else
094                    {
095                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_policy_type", _opsClass);
096                    if( _so == null )
097                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
098                            NonTxTargetPolicyOperations _localServant = (NonTxTargetPolicyOperations)_so.servant;
099                            int _result;
100                    try
101                    {
102                            _result = _localServant.policy_type();
103                    }
104                    finally
105                    {
106                            _servant_postinvoke(_so);
107                    }
108                    return _result;
109                    }
110                    }
111    
112            }
113    
114            public org.omg.CORBA.Policy copy()
115            {
116                    while(true)
117                    {
118                    if(! this._is_local())
119                    {
120                            org.omg.CORBA.portable.InputStream _is = null;
121                            try
122                            {
123                                    org.omg.CORBA.portable.OutputStream _os = _request( "copy", true);
124                                    _is = _invoke(_os);
125                                    org.omg.CORBA.Policy _result = org.omg.CORBA.PolicyHelper.read(_is);
126                                    return _result;
127                            }
128                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
129                            catch( org.omg.CORBA.portable.ApplicationException _ax )
130                            {
131                                    String _id = _ax.getId();
132                                    throw new RuntimeException("Unexpected exception " + _id );
133                            }
134                            finally
135                            {
136                                    this._releaseReply(_is);
137                            }
138                    }
139                    else
140                    {
141                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "copy", _opsClass );
142                            if( _so == null )
143                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
144                            NonTxTargetPolicyOperations _localServant = (NonTxTargetPolicyOperations)_so.servant;
145                            org.omg.CORBA.Policy _result;
146                            try
147                            {
148                                    _result = _localServant.copy();
149                            }
150                            finally
151                            {
152                                    _servant_postinvoke(_so);
153                            }
154                            return _result;
155                    }
156    
157                    }
158    
159            }
160    
161            public void destroy()
162            {
163                    while(true)
164                    {
165                    if(! this._is_local())
166                    {
167                            org.omg.CORBA.portable.InputStream _is = null;
168                            try
169                            {
170                                    org.omg.CORBA.portable.OutputStream _os = _request( "destroy", true);
171                                    _is = _invoke(_os);
172                                    return;
173                            }
174                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
175                            catch( org.omg.CORBA.portable.ApplicationException _ax )
176                            {
177                                    String _id = _ax.getId();
178                                    throw new RuntimeException("Unexpected exception " + _id );
179                            }
180                            finally
181                            {
182                                    this._releaseReply(_is);
183                            }
184                    }
185                    else
186                    {
187                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "destroy", _opsClass );
188                            if( _so == null )
189                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
190                            NonTxTargetPolicyOperations _localServant = (NonTxTargetPolicyOperations)_so.servant;
191                            try
192                            {
193                                    _localServant.destroy();
194                            }
195                            finally
196                            {
197                                    _servant_postinvoke(_so);
198                            }
199                            return;
200                    }
201    
202                    }
203    
204            }
205    
206    }