public static DispatchStatus ice_ping___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); __obj.ice_ping(__current); inS__.writeEmptyParams__(); return(DispatchStatus.DispatchOK); }
public static Task <Ice.OutputStream> ice_ping___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); __obj.ice_ping(__current); inS__.setResult(inS__.writeEmptyParams()); return(null); }
public virtual DispatchStatus dispatch__(IceInternal.Incoming inc, Current current) { int pos = System.Array.BinarySearch(all__, current.operation); if (pos < 0) { throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); } switch (pos) { case 0: { return(ice_id___(this, inc, current)); } case 1: { return(ice_ids___(this, inc, current)); } case 2: { return(ice_isA___(this, inc, current)); } case 3: { return(ice_ping___(this, inc, current)); } } Debug.Assert(false); throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); }
public virtual Task <OutputStream> iceDispatch(IceInternal.Incoming inc, Current current) { int pos = Array.BinarySearch(_all, current.operation); if (pos < 0) { throw new OperationNotExistException(current.id, current.facet, current.operation); } switch (pos) { case 0: { return(iceD_ice_id(this, inc, current)); } case 1: { return(iceD_ice_ids(this, inc, current)); } case 2: { return(iceD_ice_isA(this, inc, current)); } case 3: { return(iceD_ice_ping(this, inc, current)); } } Debug.Assert(false); throw new OperationNotExistException(current.id, current.facet, current.operation); }
dispatch__(IceInternal.Incoming inc, Current current) { try { DispatchStatus status = dispatch(inc); if (status != DispatchStatus.DispatchAsync) { // // Make sure 'inc' owns the connection etc. // inc.killAsync(); } return(status); } catch (ResponseSentException) { return(DispatchStatus.DispatchAsync); } catch (System.Exception) { try { inc.killAsync(); throw; } catch (ResponseSentException) { return(DispatchStatus.DispatchAsync); } } }
/// <summary> /// Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation /// to a servant (or to another interceptor). /// </summary> /// <param name="request">The details of the invocation.</param> /// <param name="cb">The callback object for asynchchronous dispatch. For synchronous dispatch, the /// callback object must be null.</param> /// <returns>The dispatch status for the operation.</returns> public virtual DispatchStatus ice_dispatch(Request request, DispatchInterceptorAsyncCallback cb) { if (request.isCollocated()) { return(collocDispatch__((IceInternal.Direct)request)); } else { IceInternal.Incoming inc = (IceInternal.Incoming)request; if (cb != null) { inc.push(cb); } try { inc.startOver(); // may raise ResponseSentException return(dispatch__(inc, inc.getCurrent())); } finally { if (cb != null) { inc.pop(); } } } }
public virtual Ice.DispatchStatus dispatch__(IceInternal.Incoming inS__, Ice.Current current__) { int pos = _System.Array.BinarySearch(all__, current__.operation, IceUtilInternal.StringUtil.OrdinalStringComparer); if (pos < 0) { throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation); } switch (pos) { case 0: { return(Ice.ObjectImpl.ice_id___(this, inS__, current__)); } case 1: { return(Ice.ObjectImpl.ice_ids___(this, inS__, current__)); } case 2: { return(Ice.ObjectImpl.ice_isA___(this, inS__, current__)); } case 3: { return(Ice.ObjectImpl.ice_ping___(this, inS__, current__)); } } _System.Diagnostics.Debug.Assert(false); throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation); }
public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current) { byte[] inEncaps = inS__.readParamEncaps(); var in__ = new IceInternal.IncomingAsync(inS__); try { ice_invokeAsync(inEncaps, current).ContinueWith( (t) => { try { var ret__ = t.Result; in__.writeParamEncaps__(ret__.outEncaps, ret__.returnValue); } catch (AggregateException ae) { in__.exception__(ae.InnerException); return; } in__.response__(); }); } catch (System.Exception ex) { in__.ice_exception(ex); } return(DispatchStatus.DispatchAsync); }
public static Task <OutputStream> iceD_ice_ping(Object obj, IceInternal.Incoming inS, Current current) { inS.readEmptyParams(); obj.ice_ping(current); inS.setResult(inS.writeEmptyParams()); return(null); }
public static Ice.DispatchStatus shutdown___(CallbackSender obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); inS__.readEmptyParams(); obj__.shutdown(current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static Ice.DispatchStatus logout___(BaseService obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); inS__.readEmptyParams(); obj__.logout(current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static DispatchStatus ice_ids___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); string[] ret__ = __obj.ice_ids(__current); IceInternal.BasicStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat); os__.writeStringSeq(ret__); inS__.endWriteParams__(true); return(DispatchStatus.DispatchOK); }
public override Task <OutputStream> iceDispatch(IceInternal.Incoming inS, Current current) { byte[] inEncaps = inS.readParamEncaps(); byte[] outEncaps; bool ok = ice_invoke(inEncaps, out outEncaps, current); inS.setResult(inS.writeParamEncaps(outEncaps, ok)); return(null); }
public override Task <Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current) { byte[] inEncaps = inS.readParamEncaps(); return(ice_invokeAsync(inEncaps, current).ContinueWith((Task <Object_Ice_invokeResult> t) => { var ret = t.GetAwaiter().GetResult(); return Task.FromResult(inS.writeParamEncaps(ret.outEncaps, ret.returnValue)); }).Unwrap()); }
iceD_GetProperty(IRoleMaster obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Idempotent, current.mode); inS.readEmptyParams(); return(inS.setResultTask <MasterProperty>(obj.GetPropertyAsync(current), (ostr, ret) => { ret.ice_writeMembers(ostr); })); }
public static Task <Ice.OutputStream> ice_id___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); var __ret = __obj.ice_id(__current); var os__ = inS__.startWriteParams(); os__.writeString(__ret); inS__.endWriteParams(os__); inS__.setResult(os__); return(null); }
iceD_ZoneSync(IZonePush obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Normal, current.mode); var istr = inS.startReadParams(); byte[] iceP_data; iceP_data = BytesHelper.read(istr); inS.endReadParams(); obj.ZoneSync(iceP_data, current); return(inS.setResult(inS.writeEmptyParams())); }
iceD_callback(CallbackReceiver obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Normal, current.mode); var istr = inS.startReadParams(); string iceP_messageCallback; iceP_messageCallback = istr.readString(); inS.endReadParams(); obj.callback(iceP_messageCallback, current); return(inS.setResult(inS.writeEmptyParams())); }
public static Ice.DispatchStatus initiateCallback___(CallbackSender obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); Demo.CallbackReceiverPrx proxy; proxy = Demo.CallbackReceiverPrxHelper.read__(is__); inS__.endReadParams(); obj__.initiateCallback(proxy, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
iceD_SetProperty(IRoleMaster obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Normal, current.mode); var istr = inS.startReadParams(); MasterProperty iceP_property; iceP_property = new MasterProperty(); iceP_property.ice_readMembers(istr); inS.endReadParams(); return(inS.setResultTask(obj.SetPropertyAsync(iceP_property, current))); }
public static Task <OutputStream> iceD_ice_id(Object obj, IceInternal.Incoming inS, Current current) { inS.readEmptyParams(); var ret = obj.ice_id(current); var ostr = inS.startWriteParams(); ostr.writeString(ret); inS.endWriteParams(ostr); inS.setResult(ostr); return(null); }
public static Ice.DispatchStatus onRecv___(ConnectionListener obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); string xmlContent; xmlContent = is__.readString(); inS__.endReadParams(); obj__.onRecv(xmlContent, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static Ice.DispatchStatus printString___(Printer obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); string s; s = is__.readString(); inS__.endReadParams(); obj__.printString(s, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static Ice.DispatchStatus TransHeartbeat___(CallbackClient obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); long lTime; lTime = is__.readLong(); inS__.endReadParams(); obj__.TransHeartbeat(lTime, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
iceD_PropertyChanged(IRoleMasterPush obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Normal, current.mode); var istr = inS.startReadParams(); MasterProperty iceP_property; iceP_property = new MasterProperty(); iceP_property.ice_readMembers(istr); inS.endReadParams(); obj.PropertyChanged(iceP_property, current); return(inS.setResult(inS.writeEmptyParams())); }
public static Ice.DispatchStatus SetWriteLogFlag___(LogServer_RPC obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); bool bWrite; bWrite = is__.readBool(); inS__.endReadParams(); obj__.SetWriteLogFlag(bWrite, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static DispatchStatus ice_isA___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { InputStream is__ = inS__.startReadParams(); string __id = is__.readString(); inS__.endReadParams(); bool __ret = __obj.ice_isA(__id, __current); OutputStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat); os__.writeBool(__ret); inS__.endWriteParams__(true); return(DispatchStatus.DispatchOK); }
public override Task <Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current) { byte[] inEncaps = inS.readParamEncaps(); var task = ice_invokeAsync(inEncaps, current); var cached = inS.getAndClearCachedOutputStream(); return(task.ContinueWith((Task <Object_Ice_invokeResult> t) => { var ret = t.GetAwaiter().GetResult(); return Task.FromResult(inS.writeParamEncaps(cached, ret.outEncaps, ret.returnValue)); }, TaskScheduler.Current).Unwrap()); }
public static Ice.DispatchStatus sendImage___(Printer obj__, IceInternal.Incoming inS__, Ice.Current current__) { Ice.ObjectImpl.checkMode__(Ice.OperationMode.Normal, current__.mode); IceInternal.BasicStream is__ = inS__.startReadParams(); byte[] seq; string name; seq = demo.ByteSeqHelper.read(is__); name = is__.readString(); inS__.endReadParams(); obj__.sendImage(seq, name, current__); inS__.writeEmptyParams__(); return(Ice.DispatchStatus.DispatchOK); }
public static Task <OutputStream> iceD_ice_isA(Object obj, IceInternal.Incoming inS, Current current) { InputStream istr = inS.startReadParams(); var id = istr.readString(); inS.endReadParams(); var ret = obj.ice_isA(id, current); var ostr = inS.startWriteParams(); ostr.writeBool(ret); inS.endWriteParams(ostr); inS.setResult(ostr); return(null); }
private void reclaimIncoming(IceInternal.Incoming inc) { if(_cacheBuffers) { lock(_incomingCacheMutex) { inc.next = _incomingCache; _incomingCache = inc; // // Clear references to Ice objects as soon as possible. // _incomingCache.reclaim(); } } }
private IceInternal.Incoming getIncoming(ObjectAdapter adapter, bool response, byte compress, int requestId) { IceInternal.Incoming inc = null; if(_cacheBuffers) { lock(_incomingCacheMutex) { if(_incomingCache == null) { inc = new IceInternal.Incoming(_instance, this, this, adapter, response, compress, requestId); } else { inc = _incomingCache; _incomingCache = _incomingCache.next; inc.reset(_instance, this, this, adapter, response, compress, requestId); inc.next = null; } } } else { inc = new IceInternal.Incoming(_instance, this, this, adapter, response, compress, requestId); } return inc; }
private void finish() { if(!_initialized) { if(_instance.traceLevels().network >= 2) { StringBuilder s = new StringBuilder("failed to "); s.Append(_connector != null ? "establish" : "accept"); s.Append(" "); s.Append(_endpoint.protocol()); s.Append(" connection\n"); s.Append(ToString()); s.Append("\n"); s.Append(_exception); _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString()); } } else { if(_instance.traceLevels().network >= 1) { StringBuilder s = new StringBuilder("closed "); s.Append(_endpoint.protocol()); s.Append(" connection\n"); s.Append(ToString()); // // Trace the cause of unexpected connection closures // if(!(_exception is CloseConnectionException || _exception is ForcedCloseConnectionException || _exception is ConnectionTimeoutException || _exception is CommunicatorDestroyedException || _exception is ObjectAdapterDeactivatedException)) { s.Append("\n"); s.Append(_exception); } _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString()); } } if(_startCallback != null) { _startCallback.connectionStartFailed(this, _exception); _startCallback = null; } if(_sendStreams.Count > 0) { if(!_writeStream.isEmpty()) { // // Return the stream to the outgoing call. This is important for // retriable AMI calls which are not marshalled again. // OutgoingMessage message = _sendStreams.First.Value; _writeStream.swap(message.stream); // // The current message might be sent but not yet removed from _sendStreams. If // the response has been received in the meantime, we remove the message from // _sendStreams to not call finished on a message which is already done. // if(message.isSent || message.receivedReply) { if(message.sent() && message.sentCallback != null) { message.outAsync.invokeSent(message.sentCallback); } if(message.receivedReply) { IceInternal.OutgoingAsync outAsync = (IceInternal.OutgoingAsync)message.outAsync; Ice.AsyncCallback cb = outAsync.completed(); if(cb != null) { outAsync.invokeCompleted(cb); } } _sendStreams.RemoveFirst(); } } foreach(OutgoingMessage m in _sendStreams) { m.completed(_exception); if(m.requestId > 0) // Make sure finished isn't called twice. { _asyncRequests.Remove(m.requestId); } } _sendStreams.Clear(); } foreach(IceInternal.OutgoingAsyncBase o in _asyncRequests.Values) { Ice.AsyncCallback cb = o.completed(_exception); if(cb != null) { o.invokeCompleted(cb); } } _asyncRequests.Clear(); // // Don't wait to be reaped to reclaim memory allocated by read/write streams. // _writeStream.clear(); _writeStream.getBuffer().clear(); _readStream.clear(); _readStream.getBuffer().clear(); _incomingCache = null; if(_closeCallback != null) { try { _closeCallback(this); } catch(System.Exception ex) { _logger.error("connection callback exception:\n" + ex + '\n' + _desc); } _closeCallback = null; } _heartbeatCallback = null; // // This must be done last as this will cause waitUntilFinished() to return (and communicator // objects such as the timer might be destroyed too). // lock(this) { setState(StateFinished); if(_dispatchCount == 0) { reap(); } } }