// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.1 package Ice; // <auto-generated> // // Generated from file `Properties.ice' // // Warning: do not edit this file. // // </auto-generated> /** * The PropertiesAdmin interface provides remote access to the properties * of a communicator. * **/ public final class PropertiesAdminPrxHelper extends Ice.ObjectPrxHelperBase implements PropertiesAdminPrx { /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param prefix The prefix to search for (empty string if none). * @return The matching property set. * **/ public java.util.Map<java.lang.String, java.lang.String> getPropertiesForPrefix(String prefix) { return getPropertiesForPrefix(prefix, null, false); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param prefix The prefix to search for (empty string if none). * @param __ctx The Context map to send with the invocation. * @return The matching property set. * **/ public java.util.Map<java.lang.String, java.lang.String> getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx) { return getPropertiesForPrefix(prefix, __ctx, true); } private java.util.Map<java.lang.String, java.lang.String> getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx, boolean __explicitCtx) { if(__explicitCtx && __ctx == null) { __ctx = _emptyContext; } int __cnt = 0; while(true) { Ice._ObjectDel __delBase = null; try { __checkTwowayOnly("getPropertiesForPrefix"); __delBase = __getDelegate(false); _PropertiesAdminDel __del = (_PropertiesAdminDel)__delBase; return __del.getPropertiesForPrefix(prefix, __ctx); } catch(IceInternal.LocalExceptionWrapper __ex) { __handleExceptionWrapper(__delBase, __ex); } catch(Ice.LocalException __ex) { __cnt = __handleException(__delBase, __ex, null, __cnt); } } } private static final String __getPropertiesForPrefix_name = "getPropertiesForPrefix"; /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix) { return begin_getPropertiesForPrefix(prefix, null, false, null); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx) { return begin_getPropertiesForPrefix(prefix, __ctx, true, null); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, Ice.Callback __cb) { return begin_getPropertiesForPrefix(prefix, null, false, __cb); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx, Ice.Callback __cb) { return begin_getPropertiesForPrefix(prefix, __ctx, true, __cb); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, Callback_PropertiesAdmin_getPropertiesForPrefix __cb) { return begin_getPropertiesForPrefix(prefix, null, false, __cb); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx, Callback_PropertiesAdmin_getPropertiesForPrefix __cb) { return begin_getPropertiesForPrefix(prefix, __ctx, true, __cb); } private Ice.AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb) { __checkAsyncTwowayOnly(__getPropertiesForPrefix_name); IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __getPropertiesForPrefix_name, __cb); try { __result.__prepare(__getPropertiesForPrefix_name, Ice.OperationMode.Normal, __ctx, __explicitCtx); IceInternal.BasicStream __os = __result.__os(); __os.writeString(prefix); __os.endWriteEncaps(); __result.__send(true); } catch(Ice.LocalException __ex) { __result.__exceptionAsync(__ex); } return __result; } /** * ice_response indicates that * the operation completed successfully. * @param __ret (return value) The matching property set. * **/ public java.util.Map<java.lang.String, java.lang.String> end_getPropertiesForPrefix(Ice.AsyncResult __result) { Ice.AsyncResult.__check(__result, this, __getPropertiesForPrefix_name); if(!__result.__wait()) { try { __result.__throwUserException(); } catch(Ice.UserException __ex) { throw new Ice.UnknownUserException(__ex.ice_name()); } } java.util.Map<java.lang.String, java.lang.String> __ret; IceInternal.BasicStream __is = __result.__is(); __is.startReadEncaps(); __ret = new java.util.TreeMap<String, String>(); int __sz0 = __is.readSize(); for(int __i0 = 0; __i0 < __sz0; __i0++) { String __key; __key = __is.readString(); String __value; __value = __is.readString(); __ret.put(__key, __value); } __is.endReadEncaps(); return __ret; } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). **/ public boolean getPropertiesForPrefix_async(AMI_PropertiesAdmin_getPropertiesForPrefix __cb, String prefix) { Ice.AsyncResult __r; try { __checkTwowayOnly(__getPropertiesForPrefix_name); __r = begin_getPropertiesForPrefix(prefix, null, false, __cb); } catch(Ice.TwowayOnlyException ex) { __r = new IceInternal.OutgoingAsync(this, __getPropertiesForPrefix_name, __cb); __r.__exceptionAsync(ex); } return __r.sentSynchronously(); } /** * Get all properties whose keys begins with * <em>prefix</em>. If * <em>prefix</em> is an empty string, * then all properties are returned. * * @param __cb The callback object for the operation. * @param prefix The prefix to search for (empty string if none). * @param __ctx The Context map to send with the invocation. **/ public boolean getPropertiesForPrefix_async(AMI_PropertiesAdmin_getPropertiesForPrefix __cb, String prefix, java.util.Map<String, String> __ctx) { Ice.AsyncResult __r; try { __checkTwowayOnly(__getPropertiesForPrefix_name); __r = begin_getPropertiesForPrefix(prefix, __ctx, true, __cb); } catch(Ice.TwowayOnlyException ex) { __r = new IceInternal.OutgoingAsync(this, __getPropertiesForPrefix_name, __cb); __r.__exceptionAsync(ex); } return __r.sentSynchronously(); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param key The property key. * * @return The property value. * **/ public String getProperty(String key) { return getProperty(key, null, false); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param key The property key. * * @param __ctx The Context map to send with the invocation. * @return The property value. * **/ public String getProperty(String key, java.util.Map<String, String> __ctx) { return getProperty(key, __ctx, true); } private String getProperty(String key, java.util.Map<String, String> __ctx, boolean __explicitCtx) { if(__explicitCtx && __ctx == null) { __ctx = _emptyContext; } int __cnt = 0; while(true) { Ice._ObjectDel __delBase = null; try { __checkTwowayOnly("getProperty"); __delBase = __getDelegate(false); _PropertiesAdminDel __del = (_PropertiesAdminDel)__delBase; return __del.getProperty(key, __ctx); } catch(IceInternal.LocalExceptionWrapper __ex) { __handleExceptionWrapper(__delBase, __ex); } catch(Ice.LocalException __ex) { __cnt = __handleException(__delBase, __ex, null, __cnt); } } } private static final String __getProperty_name = "getProperty"; /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * **/ public Ice.AsyncResult begin_getProperty(String key) { return begin_getProperty(key, null, false, null); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getProperty(String key, java.util.Map<String, String> __ctx) { return begin_getProperty(key, __ctx, true, null); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * **/ public Ice.AsyncResult begin_getProperty(String key, Ice.Callback __cb) { return begin_getProperty(key, null, false, __cb); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getProperty(String key, java.util.Map<String, String> __ctx, Ice.Callback __cb) { return begin_getProperty(key, __ctx, true, __cb); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * **/ public Ice.AsyncResult begin_getProperty(String key, Callback_PropertiesAdmin_getProperty __cb) { return begin_getProperty(key, null, false, __cb); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_getProperty(String key, java.util.Map<String, String> __ctx, Callback_PropertiesAdmin_getProperty __cb) { return begin_getProperty(key, __ctx, true, __cb); } private Ice.AsyncResult begin_getProperty(String key, java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb) { __checkAsyncTwowayOnly(__getProperty_name); IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __getProperty_name, __cb); try { __result.__prepare(__getProperty_name, Ice.OperationMode.Normal, __ctx, __explicitCtx); IceInternal.BasicStream __os = __result.__os(); __os.writeString(key); __os.endWriteEncaps(); __result.__send(true); } catch(Ice.LocalException __ex) { __result.__exceptionAsync(__ex); } return __result; } /** * ice_response indicates that * the operation completed successfully. * @param __ret (return value) The property value. * **/ public String end_getProperty(Ice.AsyncResult __result) { Ice.AsyncResult.__check(__result, this, __getProperty_name); if(!__result.__wait()) { try { __result.__throwUserException(); } catch(Ice.UserException __ex) { throw new Ice.UnknownUserException(__ex.ice_name()); } } String __ret; IceInternal.BasicStream __is = __result.__is(); __is.startReadEncaps(); __ret = __is.readString(); __is.endReadEncaps(); return __ret; } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * **/ public boolean getProperty_async(AMI_PropertiesAdmin_getProperty __cb, String key) { Ice.AsyncResult __r; try { __checkTwowayOnly(__getProperty_name); __r = begin_getProperty(key, null, false, __cb); } catch(Ice.TwowayOnlyException ex) { __r = new IceInternal.OutgoingAsync(this, __getProperty_name, __cb); __r.__exceptionAsync(ex); } return __r.sentSynchronously(); } /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param __cb The callback object for the operation. * @param key The property key. * * @param __ctx The Context map to send with the invocation. **/ public boolean getProperty_async(AMI_PropertiesAdmin_getProperty __cb, String key, java.util.Map<String, String> __ctx) { Ice.AsyncResult __r; try { __checkTwowayOnly(__getProperty_name); __r = begin_getProperty(key, __ctx, true, __cb); } catch(Ice.TwowayOnlyException ex) { __r = new IceInternal.OutgoingAsync(this, __getProperty_name, __cb); __r.__exceptionAsync(ex); } return __r.sentSynchronously(); } public static PropertiesAdminPrx checkedCast(Ice.ObjectPrx __obj) { PropertiesAdminPrx __d = null; if(__obj != null) { try { __d = (PropertiesAdminPrx)__obj; } catch(ClassCastException ex) { if(__obj.ice_isA("::Ice::PropertiesAdmin")) { PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } } return __d; } public static PropertiesAdminPrx checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx) { PropertiesAdminPrx __d = null; if(__obj != null) { try { __d = (PropertiesAdminPrx)__obj; } catch(ClassCastException ex) { if(__obj.ice_isA("::Ice::PropertiesAdmin", __ctx)) { PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } } return __d; } public static PropertiesAdminPrx checkedCast(Ice.ObjectPrx __obj, String __facet) { PropertiesAdminPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); try { if(__bb.ice_isA("::Ice::PropertiesAdmin")) { PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__bb); __d = __h; } } catch(Ice.FacetNotExistException ex) { } } return __d; } public static PropertiesAdminPrx checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx) { PropertiesAdminPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); try { if(__bb.ice_isA("::Ice::PropertiesAdmin", __ctx)) { PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__bb); __d = __h; } } catch(Ice.FacetNotExistException ex) { } } return __d; } public static PropertiesAdminPrx uncheckedCast(Ice.ObjectPrx __obj) { PropertiesAdminPrx __d = null; if(__obj != null) { try { __d = (PropertiesAdminPrx)__obj; } catch(ClassCastException ex) { PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } return __d; } public static PropertiesAdminPrx uncheckedCast(Ice.ObjectPrx __obj, String __facet) { PropertiesAdminPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); PropertiesAdminPrxHelper __h = new PropertiesAdminPrxHelper(); __h.__copyFrom(__bb); __d = __h; } return __d; } protected Ice._ObjectDelM __createDelegateM() { return new _PropertiesAdminDelM(); } protected Ice._ObjectDelD __createDelegateD() { return new _PropertiesAdminDelD(); } public static void __write(IceInternal.BasicStream __os, PropertiesAdminPrx v) { __os.writeProxy(v); } public static PropertiesAdminPrx __read(IceInternal.BasicStream __is) { Ice.ObjectPrx proxy = __is.readProxy(); if(proxy != null) { PropertiesAdminPrxHelper result = new PropertiesAdminPrxHelper(); result.__copyFrom(proxy); return result; } return null; } }