public HServerR(BTransport transport, BServer server, int nbOfConns) : base(transport, server) { this.nbOfConns = nbOfConns; this.sleepMillisBeforeRetry = 30 * 1000; //workerThread = new Thread(new ParameterizedThreadStart(workerFnct)); }
public BInput(BTransport transport, BMessageHeader responseHeader, BRegistry registry) { this.header = responseHeader; this.transport = transport; this.registry = registry; this.idMap = transport.getApiDesc().uniqueObjects ? null : new Dictionary <int, Object>(); }
public override BOutput getResponse(BTransport transport, BMessageHeader requestHeader) { if (negotiatedByteOrder == ByteOrder.UNDEFINED) { throw new BException(BExceptionC.INTERNAL, "Protocol object can only be used for input."); } return(new BOutputS(transport, requestHeader)); }
public override BOutput getOutput(BTransport transport) { if (negotiatedByteOrder == ByteOrder.UNDEFINED) { throw new BException(BExceptionC.INTERNAL, "Protocol object can only be used for input."); } return(new BOutputS(transport, negotiatedBypsVersion, negotiatedVersion, negotiatedByteOrder)); }
public BOutput(BTransport transport, BRegistry registry, int streamHeaderMagic, int negotiatedBypsVersion, long negotiatedVersion, ByteOrder negotiatedByteOrder) { this.objMap = transport.getApiDesc().uniqueObjects ? null : new BObjMap(); this.header = new BMessageHeader(streamHeaderMagic, negotiatedBypsVersion, negotiatedVersion, negotiatedByteOrder, transport.getWire().makeMessageId()); this.header.targetId = transport.getTargetId(); this.header.sessionId = transport.getSessionId(); this.transport = transport; this.registry = registry; this.streams = null; }
public BOutput(BTransport transport, BRegistry registry, BMessageHeader requestHeader) { this.objMap = transport.getApiDesc().uniqueObjects ? null : new BObjMap(); this.header = requestHeader; this.header.targetId = transport.getTargetId(); this.header.sessionId = transport.getSessionId(); this.transport = transport; this.registry = registry; this.streams = null; }
public BTransport(BTransport rhs, BTargetId targetId) { this.apiDesc = rhs.apiDesc; this.wire = rhs.wire; this.targetId = targetId; this.sessionId = rhs.sessionId; this.protocol = rhs.getProtocol(); // Still connected to the server given by rhs. this.connectedServerId = rhs.targetId.getServerId(); }
public void setAsyncResult(ByteBuffer buf, Exception ex) { if (log.isDebugEnabled()) { log.debug("setAsyncResult" + this + "(buf=" + buf + ", ex=" + ex); } if (Interlocked.Increment(ref isOpen) == 1) { try { if (ex == null && buf != null && buf.remaining() != 0) { BMessageHeader header = new BMessageHeader(); bool nego = BNegotiate.isNegotiateMessage(buf); if (nego) { BNegotiate negoResponse = new BNegotiate(); negoResponse.read(buf); header.messageId = messageId; BTransport utransport = wire.getClientUtilityRequests().getTransport(); utransport.applyNegotiate(negoResponse); } else { header.read(buf); } BMessage msg = buf != null ? new BMessage(header, buf, null) : null; if (log.isDebugEnabled()) { log.debug("asyncResult.set"); } asyncResult.setAsyncResult(msg, ex); } else { asyncResult.setAsyncResult(null, ex); } } catch (Exception e) { asyncResult.setAsyncResult(null, e); } } if (log.isDebugEnabled()) { log.debug(")setAsyncResult"); } }
public override Object read(Object obj, BInput bin1, long version) { BInputBin bin = ((BInputBin)bin1); BRemote remote = null; BTargetId targetId = BTargetId.read(bin.bbuf.getBuffer(), bin1.header.bversion); BRemoteRegistry rreg = bin.transport.getRemoteRegistry(); if (rreg != null) { remote = rreg.getRemote(bin.header.targetId, targetId, typeId); } else { BTransport transport = new BTransport(bin.transport, targetId); remote = internalCreate(transport); } return(remote); }
public BInputS(BTransport transport, BMessageHeader responseHeader, ByteBuffer buf) : base(transport, responseHeader, buf, transport.getApiDesc().getRegistry(BBinaryModel.MEDIUM)) { }
public abstract BOutput getResponse(BTransport transport, BMessageHeader requestHeader);
public abstract BInput getInput(BTransport transport, BMessageHeader responseHeader, ByteBuffer buf);
public MyAsyncResultRelogin(BTransport transport, BMethodRequest methodRequest, BAsyncResultIF <T> innerResult) { this.transport = transport; this.methodRequest = methodRequest; this.innerResult = innerResult; }
public abstract BOutput getOutput(BTransport transport);
public BOutputS(BTransport transport, BMessageHeader requestHeader) : base(transport, requestHeader) { }
public BOutputBin(BTransport transport, BMessageHeader requestHeader) : base(transport, transport.getApiDesc().getRegistry(BBinaryModel.MEDIUM), requestHeader) { this.bbuf = (BBufferBin)BBuffer.create(BBinaryModel.MEDIUM, null); }
public MyNegoAsyncResult(BTransport transport, BAsyncResultIF <bool> innerResult) { this.transport = transport; this.innerResult = innerResult; }
public MethodResult(BTransport transport, BAsyncResultIF <BMessage> asyncResult, BInput bin) { this.transport = transport; this.asyncResult = asyncResult; this.bin = bin; }
protected virtual BRemote internalCreate(BTransport transport) { return(null); // must be implemented by subclass }
public InternalAuthenticate_BAsyncResult(BTransport transport) { this.transport = transport; }
public BServer(BServer rhs) { this.transport = rhs.transport; this.clientR = rhs.clientR; this.remotes = rhs.remotes; }
public BServer(BTransport transport, BClient clientR) { this.transport = transport; this.clientR = clientR; this.remotes = new Dictionary <int, BRemote>(); }
public override BInput getInput(BTransport transport, BMessageHeader responseHeader, ByteBuffer buf) { return(new BInputS(transport, responseHeader, buf)); }
public BClient(BTransport transport, BServerR serverR) { this.transportVal = transport; this.serverR = serverR; this.setAuthentication(null); }
public BInputBin(BTransport transport, BMessageHeader responseHeader, ByteBuffer buf, BRegistry registry) : base(transport, responseHeader, registry) { this.bbuf = (BBufferBin)BBuffer.create(BBinaryModel.MEDIUM, buf); }
public BOutputS(BTransport transport, int negotiatedBypsVersion, long negotiatedVersion, ByteOrder negotiatedByteOrder) : base(transport, BMessageHeader.MAGIC_BINARY_STREAM, negotiatedBypsVersion, negotiatedVersion, negotiatedByteOrder) { }
public BStub(BTransport transport) { this.transport = transport; }
public BServerR(BTransport transport, BServer server) { this.transport = transport; this.server = new MyServer(this, server); }
public BOutputBin(BTransport transport, int streamHeaderMagic, int negotiatedBypsVersion, long negotiatedVersion, ByteOrder negotiatedByteOrder) : base(transport, transport.getApiDesc().getRegistry(BBinaryModel.MEDIUM), streamHeaderMagic, negotiatedBypsVersion, negotiatedVersion, negotiatedByteOrder) { this.bbuf = (BBufferBin)BBuffer.create(BBinaryModel.MEDIUM, null); }