com.zeroc.Ice.RouterFinder Maven / Gradle / Ivy
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
//
//
// Generated from file `Router.ice'
//
// Warning: do not edit this file.
//
//
//
package com.zeroc.Ice;
/**
* This inferface should be implemented by services implementing the
* Ice::Router interface. It should be advertised through an Ice
* object with the identity `Ice/RouterFinder'. This allows clients to
* retrieve the router proxy with just the endpoint information of the
* service.
**/
public interface RouterFinder extends Object
{
/**
* Get the router proxy implemented by the process hosting this
* finder object. The proxy might point to several replicas.
* @param current The Current object for the invocation.
* @return The router proxy.
**/
RouterPrx getRouter(Current current);
/** @hidden */
static final String[] _iceIds =
{
"::Ice::Object",
"::Ice::RouterFinder"
};
@Override
default String[] ice_ids(Current current)
{
return _iceIds;
}
@Override
default String ice_id(Current current)
{
return ice_staticId();
}
static String ice_staticId()
{
return "::Ice::RouterFinder";
}
/**
* @hidden
* @param obj -
* @param inS -
* @param current -
* @return -
**/
static java.util.concurrent.CompletionStage _iceD_getRouter(RouterFinder obj, final com.zeroc.IceInternal.Incoming inS, Current current)
{
Object._iceCheckMode(null, current.mode);
inS.readEmptyParams();
RouterPrx ret = obj.getRouter(current);
OutputStream ostr = inS.startWriteParams();
ostr.writeProxy(ret);
inS.endWriteParams(ostr);
return inS.setResult(ostr);
}
/** @hidden */
final static String[] _iceOps =
{
"getRouter",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
/** @hidden */
@Override
default java.util.concurrent.CompletionStage _iceDispatch(com.zeroc.IceInternal.Incoming in, Current current)
throws UserException
{
int pos = java.util.Arrays.binarySearch(_iceOps, current.operation);
if(pos < 0)
{
throw new OperationNotExistException(current.id, current.facet, current.operation);
}
switch(pos)
{
case 0:
{
return _iceD_getRouter(this, in, current);
}
case 1:
{
return Object._iceD_ice_id(this, in, current);
}
case 2:
{
return Object._iceD_ice_ids(this, in, current);
}
case 3:
{
return Object._iceD_ice_isA(this, in, current);
}
case 4:
{
return Object._iceD_ice_ping(this, in, current);
}
}
assert(false);
throw new OperationNotExistException(current.id, current.facet, current.operation);
}
}