// **********************************************************************
//
// 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 `Router.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
/**
* The Glacier2 administrative interface. This must only be
* accessible from inside the firewall.
*
**/
public final class AdminPrxHelper extends Ice.ObjectPrxHelperBase implements AdminPrx
{
/**
* Shut down the Glacier2 router.
*
**/
public void
shutdown()
{
shutdown(null, false);
}
/**
* Shut down the Glacier2 router.
*
* @param __ctx The Context map to send with the invocation.
**/
public void
shutdown(java.util.Map<String, String> __ctx)
{
shutdown(__ctx, true);
}
private void
shutdown(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);
_AdminDel __del = (_AdminDel)__delBase;
__del.shutdown(__ctx);
return;
}
catch(IceInternal.LocalExceptionWrapper __ex)
{
__handleExceptionWrapper(__delBase, __ex);
}
catch(Ice.LocalException __ex)
{
__cnt = __handleException(__delBase, __ex, null, __cnt);
}
}
}
private static final String __shutdown_name = "shutdown";
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
**/
public Ice.AsyncResult begin_shutdown()
{
return begin_shutdown(null, false, null);
}
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
* @param __ctx The Context map to send with the invocation.
**/
public Ice.AsyncResult begin_shutdown(java.util.Map<String, String> __ctx)
{
return begin_shutdown(__ctx, true, null);
}
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
**/
public Ice.AsyncResult begin_shutdown(Ice.Callback __cb)
{
return begin_shutdown(null, false, __cb);
}
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
* @param __ctx The Context map to send with the invocation.
**/
public Ice.AsyncResult begin_shutdown(java.util.Map<String, String> __ctx, Ice.Callback __cb)
{
return begin_shutdown(__ctx, true, __cb);
}
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
**/
public Ice.AsyncResult begin_shutdown(Callback_Admin_shutdown __cb)
{
return begin_shutdown(null, false, __cb);
}
/**
* Shut down the Glacier2 router.
*
* @param __cb The callback object for the operation.
* @param __ctx The Context map to send with the invocation.
**/
public Ice.AsyncResult begin_shutdown(java.util.Map<String, String> __ctx, Callback_Admin_shutdown __cb)
{
return begin_shutdown(__ctx, true, __cb);
}
private Ice.AsyncResult begin_shutdown(java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb)
{
IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __shutdown_name, __cb);
try
{
__result.__prepare(__shutdown_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_shutdown(Ice.AsyncResult __result)
{
__end(__result, __shutdown_name);
}
public static AdminPrx
checkedCast(Ice.ObjectPrx __obj)
{
AdminPrx __d = null;
if(__obj != null)
{
try
{
__d = (AdminPrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::Glacier2::Admin"))
{
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static AdminPrx
checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx)
{
AdminPrx __d = null;
if(__obj != null)
{
try
{
__d = (AdminPrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::Glacier2::Admin", __ctx))
{
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static AdminPrx
checkedCast(Ice.ObjectPrx __obj, String __facet)
{
AdminPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::Glacier2::Admin"))
{
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static AdminPrx
checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx)
{
AdminPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::Glacier2::Admin", __ctx))
{
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static AdminPrx
uncheckedCast(Ice.ObjectPrx __obj)
{
AdminPrx __d = null;
if(__obj != null)
{
try
{
__d = (AdminPrx)__obj;
}
catch(ClassCastException ex)
{
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
return __d;
}
public static AdminPrx
uncheckedCast(Ice.ObjectPrx __obj, String __facet)
{
AdminPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
AdminPrxHelper __h = new AdminPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
return __d;
}
protected Ice._ObjectDelM
__createDelegateM()
{
return new _AdminDelM();
}
protected Ice._ObjectDelD
__createDelegateD()
{
return new _AdminDelD();
}
public static void
__write(IceInternal.BasicStream __os, AdminPrx v)
{
__os.writeProxy(v);
}
public static AdminPrx
__read(IceInternal.BasicStream __is)
{
Ice.ObjectPrx proxy = __is.readProxy();
if(proxy != null)
{
AdminPrxHelper result = new AdminPrxHelper();
result.__copyFrom(proxy);
return result;
}
return null;
}
}