public virtual bool postFrame(SessionImpl s, Frame f) { // If we're in an error state log.debug("Dropping a frame because the Session state is " + "no longer active."); return false; }
internal static Frame parseHeader(SessionImpl session, byte[] headerBuffer, int length) { HeaderParser header = new HeaderParser(headerBuffer, length); core.MessageType msgType = MessageTypeStrings.GetMessageType(header.parseType()); int channelNum = header.parseInt(); int msgNum = header.parseInt(); bool last = header.parseLast(); long seqNum = header.parseUnsignedInt(); int size = header.parseInt(); int ansNum = - 1; if (header.hasMoreTokens()) { ansNum = header.parseInt(); } if (header.hasMoreTokens()) { throw new BEEPException("Malformed BEEP Header"); } return new Frame(msgType, session.getValidChannel(channelNum), msgNum, last, seqNum, size, ansNum); }
public virtual void changeState(SessionImpl s, core.SessionState newState) { if (newState == core.SessionState.SESSION_STATE_ABORTED) { log.info("Error aborting, session already in a closed state."); } else if (newState == core.SessionState.SESSION_STATE_CLOSE_PENDING) { log.info("Error changing state to close pending, session already in a closed state."); } else { throw new BEEPException("Illegal session state transition (" + newState + ")"); } }
public virtual void changeState(SessionImpl s, core.SessionState newState) { throw new BEEPException("Illegal session state transition"); }
public virtual void changeState(SessionImpl s, core.SessionState newState) { if (!((newState == core.SessionState.SESSION_STATE_CLOSED) || (newState == core.SessionState.SESSION_STATE_ABORTED))) { throw new BEEPException("Illegal session state transition"); } s.state = newState; }
public virtual bool postFrame(SessionImpl s, Frame f) { return ((ChannelImpl) f.Channel).postFrame(f); }
public virtual bool postFrame(SessionImpl s, Frame f) { // If we're in a PRE-GREETING state // only handle one frame at a time... // to avoid processing post-greeting // frames before the greeting has been // fully handled. lock (s) { return ((ChannelImpl) f.Channel).postFrame(f); } }
internal CloseReplyListener(SessionImpl enclosingInstance, ChannelImpl channel) { InitBlock(enclosingInstance); this.channel = channel; this.error = null; }
private void InitBlock(SessionImpl enclosingInstance) { this.enclosingInstance = enclosingInstance; }
public GreetingListener(SessionImpl enclosingInstance) { InitBlock(enclosingInstance); }
public ChannelZeroListener(SessionImpl enclosingInstance) { InitBlock(enclosingInstance); }