// ********************************************************************** // // 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 Glacier2; // <auto-generated> // // Generated from file `Session.ice' // // Warning: do not edit this file. // // </auto-generated> /** * A client-visible session object, which is tied to the lifecycle of * a {@link Router}. * * @see Router * @see SessionManager * **/ public final class SessionPrxHelper extends Ice.ObjectPrxHelperBase implements SessionPrx { /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * **/ public void destroy() { destroy(null, false); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __ctx The Context map to send with the invocation. **/ public void destroy(java.util.Map<String, String> __ctx) { destroy(__ctx, true); } private void destroy(java.util.Map<String, String> __ctx, boolean __explicitCtx) { if(__explicitCtx && __ctx == null) { __ctx = _emptyContext; } int __cnt = 0; while(true) { Ice._ObjectDel __delBase = null; try { __delBase = __getDelegate(false); _SessionDel __del = (_SessionDel)__delBase; __del.destroy(__ctx); return; } catch(IceInternal.LocalExceptionWrapper __ex) { __handleExceptionWrapper(__delBase, __ex); } catch(Ice.LocalException __ex) { __cnt = __handleException(__delBase, __ex, null, __cnt); } } } private static final String __destroy_name = "destroy"; /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. **/ public Ice.AsyncResult begin_destroy() { return begin_destroy(null, false, null); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_destroy(java.util.Map<String, String> __ctx) { return begin_destroy(__ctx, true, null); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. **/ public Ice.AsyncResult begin_destroy(Ice.Callback __cb) { return begin_destroy(null, false, __cb); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_destroy(java.util.Map<String, String> __ctx, Ice.Callback __cb) { return begin_destroy(__ctx, true, __cb); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. **/ public Ice.AsyncResult begin_destroy(Callback_Session_destroy __cb) { return begin_destroy(null, false, __cb); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. * @param __ctx The Context map to send with the invocation. **/ public Ice.AsyncResult begin_destroy(java.util.Map<String, String> __ctx, Callback_Session_destroy __cb) { return begin_destroy(__ctx, true, __cb); } private Ice.AsyncResult begin_destroy(java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb) { IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __destroy_name, __cb); try { __result.__prepare(__destroy_name, Ice.OperationMode.Normal, __ctx, __explicitCtx); IceInternal.BasicStream __os = __result.__os(); __os.endWriteEncaps(); __result.__send(true); } catch(Ice.LocalException __ex) { __result.__exceptionAsync(__ex); } return __result; } /** * ice_response indicates that * the operation completed successfully. **/ public void end_destroy(Ice.AsyncResult __result) { __end(__result, __destroy_name); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. **/ public boolean destroy_async(AMI_Session_destroy __cb) { Ice.AsyncResult __r = begin_destroy(null, false, __cb); return __r.sentSynchronously(); } /** * Destroy the session. This is called automatically when the * {@link Router} is destroyed. * * @param __cb The callback object for the operation. * @param __ctx The Context map to send with the invocation. **/ public boolean destroy_async(AMI_Session_destroy __cb, java.util.Map<String, String> __ctx) { Ice.AsyncResult __r = begin_destroy(__ctx, true, __cb); return __r.sentSynchronously(); } public static SessionPrx checkedCast(Ice.ObjectPrx __obj) { SessionPrx __d = null; if(__obj != null) { try { __d = (SessionPrx)__obj; } catch(ClassCastException ex) { if(__obj.ice_isA("::Glacier2::Session")) { SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } } return __d; } public static SessionPrx checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx) { SessionPrx __d = null; if(__obj != null) { try { __d = (SessionPrx)__obj; } catch(ClassCastException ex) { if(__obj.ice_isA("::Glacier2::Session", __ctx)) { SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } } return __d; } public static SessionPrx checkedCast(Ice.ObjectPrx __obj, String __facet) { SessionPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); try { if(__bb.ice_isA("::Glacier2::Session")) { SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__bb); __d = __h; } } catch(Ice.FacetNotExistException ex) { } } return __d; } public static SessionPrx checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx) { SessionPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); try { if(__bb.ice_isA("::Glacier2::Session", __ctx)) { SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__bb); __d = __h; } } catch(Ice.FacetNotExistException ex) { } } return __d; } public static SessionPrx uncheckedCast(Ice.ObjectPrx __obj) { SessionPrx __d = null; if(__obj != null) { try { __d = (SessionPrx)__obj; } catch(ClassCastException ex) { SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__obj); __d = __h; } } return __d; } public static SessionPrx uncheckedCast(Ice.ObjectPrx __obj, String __facet) { SessionPrx __d = null; if(__obj != null) { Ice.ObjectPrx __bb = __obj.ice_facet(__facet); SessionPrxHelper __h = new SessionPrxHelper(); __h.__copyFrom(__bb); __d = __h; } return __d; } protected Ice._ObjectDelM __createDelegateM() { return new _SessionDelM(); } protected Ice._ObjectDelD __createDelegateD() { return new _SessionDelD(); } public static void __write(IceInternal.BasicStream __os, SessionPrx v) { __os.writeProxy(v); } public static SessionPrx __read(IceInternal.BasicStream __is) { Ice.ObjectPrx proxy = __is.readProxy(); if(proxy != null) { SessionPrxHelper result = new SessionPrxHelper(); result.__copyFrom(proxy); return result; } return null; } }