package org.omg.SecurityLevel2;

/**
 * Interface definition : TargetCredentials
 * 
 * @author OpenORB Compiler
 */
public class _TargetCredentialsStub extends org.omg.CORBA.portable.ObjectImpl
        implements TargetCredentials
{
    static final String[] _ids_list =
    {
        "IDL:omg.org/SecurityLevel2/TargetCredentials:1.8", 
        "IDL:omg.org/SecurityLevel2/Credentials:1.8"
    };

    public String[] _ids()
    {
     return _ids_list;
    }

    private final static Class _opsClass = org.omg.SecurityLevel2.TargetCredentialsOperations.class;

    /**
     * Read accessor for initiating_credentials attribute
     * @return the attribute value
     */
    public org.omg.SecurityLevel2.Credentials initiating_credentials()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_initiating_credentials",true);
                    _input = this._invoke(_output);
                    return org.omg.SecurityLevel2.CredentialsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_initiating_credentials",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.TargetCredentialsOperations _self = (org.omg.SecurityLevel2.TargetCredentialsOperations) _so.servant;
                try
                {
                    return _self.initiating_credentials();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for association_options_used attribute
     * @return the attribute value
     */
    public short association_options_used()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_association_options_used",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AssociationOptionsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_association_options_used",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.TargetCredentialsOperations _self = (org.omg.SecurityLevel2.TargetCredentialsOperations) _so.servant;
                try
                {
                    return _self.association_options_used();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation copy
     */
    public org.omg.SecurityLevel2.Credentials copy()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("copy",true);
                    _input = this._invoke(_output);
                    org.omg.SecurityLevel2.Credentials _arg_ret = org.omg.SecurityLevel2.CredentialsHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("copy",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.copy();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation destroy
     */
    public void destroy()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("destroy",true);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("destroy",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    _self.destroy();
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for credentials_type attribute
     * @return the attribute value
     */
    public org.omg.Security.InvocationCredentialsType credentials_type()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_credentials_type",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.InvocationCredentialsTypeHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_credentials_type",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.credentials_type();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for authentication_state attribute
     * @return the attribute value
     */
    public org.omg.Security.AuthenticationStatus authentication_state()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_authentication_state",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AuthenticationStatusHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_authentication_state",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.authentication_state();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for mechanism attribute
     * @return the attribute value
     */
    public String mechanism()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_mechanism",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.MechanismTypeHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_mechanism",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.mechanism();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for accepting_options_supported attribute
     * @return the attribute value
     */
    public short accepting_options_supported()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_accepting_options_supported",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AssociationOptionsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_accepting_options_supported",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.accepting_options_supported();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Write accessor for accepting_options_supported attribute
     * @param value the attribute value
     */
    public void accepting_options_supported(short value)
    {
        while(true)
        {
            if (!this._is_local())
            {
                    org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_set_accepting_options_supported",true);
                    org.omg.Security.AssociationOptionsHelper.write(_output,value);
                    _input = this._invoke(_output);
                    return;
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_set_accepting_options_supported",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    _self.accepting_options_supported(value);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for accepting_options_required attribute
     * @return the attribute value
     */
    public short accepting_options_required()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_accepting_options_required",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AssociationOptionsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_accepting_options_required",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.accepting_options_required();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Write accessor for accepting_options_required attribute
     * @param value the attribute value
     */
    public void accepting_options_required(short value)
    {
        while(true)
        {
            if (!this._is_local())
            {
                    org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_set_accepting_options_required",true);
                    org.omg.Security.AssociationOptionsHelper.write(_output,value);
                    _input = this._invoke(_output);
                    return;
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_set_accepting_options_required",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    _self.accepting_options_required(value);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for invocation_options_supported attribute
     * @return the attribute value
     */
    public short invocation_options_supported()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_invocation_options_supported",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AssociationOptionsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_invocation_options_supported",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.invocation_options_supported();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Write accessor for invocation_options_supported attribute
     * @param value the attribute value
     */
    public void invocation_options_supported(short value)
    {
        while(true)
        {
            if (!this._is_local())
            {
                    org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_set_invocation_options_supported",true);
                    org.omg.Security.AssociationOptionsHelper.write(_output,value);
                    _input = this._invoke(_output);
                    return;
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_set_invocation_options_supported",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    _self.invocation_options_supported(value);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for invocation_options_required attribute
     * @return the attribute value
     */
    public short invocation_options_required()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_invocation_options_required",true);
                    _input = this._invoke(_output);
                    return org.omg.Security.AssociationOptionsHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_invocation_options_required",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.invocation_options_required();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Write accessor for invocation_options_required attribute
     * @param value the attribute value
     */
    public void invocation_options_required(short value)
    {
        while(true)
        {
            if (!this._is_local())
            {
                    org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_set_invocation_options_required",true);
                    org.omg.Security.AssociationOptionsHelper.write(_output,value);
                    _input = this._invoke(_output);
                    return;
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_set_invocation_options_required",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    _self.invocation_options_required(value);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation get_security_feature
     */
    public boolean get_security_feature(org.omg.Security.CommunicationDirection direction, org.omg.Security.SecurityFeature feature)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("get_security_feature",true);
                    org.omg.Security.CommunicationDirectionHelper.write(_output,direction);
                    org.omg.Security.SecurityFeatureHelper.write(_output,feature);
                    _input = this._invoke(_output);
                    boolean _arg_ret = _input.read_boolean();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("get_security_feature",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.get_security_feature( direction,  feature);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation set_attributes
     */
    public boolean set_attributes(org.omg.Security.SecAttribute[] requested_attributes, org.omg.Security.AttributeListHolder actual_attributes)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("set_attributes",true);
                    org.omg.Security.AttributeListHelper.write(_output,requested_attributes);
                    _input = this._invoke(_output);
                    boolean _arg_ret = _input.read_boolean();
                    actual_attributes.value = org.omg.Security.AttributeListHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("set_attributes",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.set_attributes( requested_attributes,  actual_attributes);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation get_attributes
     */
    public org.omg.Security.SecAttribute[] get_attributes(org.omg.Security.AttributeType[] attributes)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("get_attributes",true);
                    org.omg.Security.AttributeTypeListHelper.write(_output,attributes);
                    _input = this._invoke(_output);
                    org.omg.Security.SecAttribute[] _arg_ret = org.omg.Security.AttributeListHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("get_attributes",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.get_attributes( attributes);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation is_valid
     */
    public boolean is_valid(org.omg.TimeBase.UtcTHolder expiry_time)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("is_valid",true);
                    _input = this._invoke(_output);
                    boolean _arg_ret = _input.read_boolean();
                    expiry_time.value = org.omg.Security.UtcTHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("is_valid",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.is_valid( expiry_time);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation refresh
     */
    public boolean refresh(org.omg.CORBA.Any refresh_data)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("refresh",true);
                    _output.write_any(refresh_data);
                    _input = this._invoke(_output);
                    boolean _arg_ret = _input.read_boolean();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("refresh",_opsClass);
                if (_so == null)
                   continue;
                org.omg.SecurityLevel2.CredentialsOperations _self = (org.omg.SecurityLevel2.CredentialsOperations) _so.servant;
                try
                {
                    return _self.refresh( refresh_data);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

}
