Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-…
Browse files Browse the repository at this point in the history
…3162_jetty_servlet_api
  • Loading branch information
joakime committed Feb 5, 2019
2 parents e4df1fe + 7fca634 commit 0817928
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,19 +424,19 @@ public void upgrade(Connection newConnection)
{
Connection old_connection = getConnection();

ByteBuffer buffer = (old_connection instanceof Connection.UpgradeFrom) ?
ByteBuffer prefilled = (old_connection instanceof Connection.UpgradeFrom) ?
((Connection.UpgradeFrom)old_connection).onUpgradeFrom() :
null;
old_connection.onClose();
old_connection.getEndPoint().setConnection(newConnection);

if (LOG.isDebugEnabled())
LOG.debug("{} upgrading from {} to {} with {}",
this, old_connection, newConnection, BufferUtil.toDetailString(buffer));
this, old_connection, newConnection, BufferUtil.toDetailString(prefilled));

if (newConnection instanceof Connection.UpgradeTo)
((Connection.UpgradeTo)newConnection).onUpgradeTo(buffer);
else if (BufferUtil.hasContent(buffer))
((Connection.UpgradeTo)newConnection).onUpgradeTo(prefilled);
else if (BufferUtil.hasContent(prefilled))
throw new IllegalStateException("Cannot upgrade: " + newConnection + " does not implement " + Connection.UpgradeTo.class.getName());

newConnection.onOpen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,6 @@ public void onTimeoutExpired()
};
}

/**
* For backward api compatibility only.
* @see #schedule(long)
*/
@Deprecated
public void schedule ()
{
schedule(calculateInactivityTimeout(System.currentTimeMillis()));
}

/**
* @param time the timeout to set; -1 means that the timer will not be
Expand Down Expand Up @@ -544,12 +535,6 @@ public void setMaxInactiveInterval(int secs)
}


@Deprecated
public void updateInactivityTimer()
{
//for backward api compatibility only
}

/**
* Calculate what the session timer setting should be based on:
* the time remaining before the session expires
Expand Down Expand Up @@ -1058,18 +1043,6 @@ protected boolean beginInvalidate()
return result;
}

/* ------------------------------------------------------------- */
/**
* Call HttpSessionAttributeListeners as part of invalidating a Session.
*
* @throws IllegalStateException if no session manager can be find
*/
@Deprecated
protected void doInvalidate() throws IllegalStateException
{
finishInvalidate();
}

/* ------------------------------------------------------------- */
/**
* Call HttpSessionAttributeListeners as part of invalidating a Session.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,6 @@ public interface SessionCache extends LifeCycle
*/
Session newSession (SessionData data);

/**
* Change the id of a session.
*
* This method has been superceded by the 4 arg renewSessionId method and
* should no longer be called.
*
* @param oldId the old id
* @param newId the new id
* @return the changed Session
* @throws Exception if anything went wrong
* @deprecated use
* {@link #renewSessionId(String oldId, String newId, String oldExtendedId, String newExtendedId)}
*/
@Deprecated
default Session renewSessionId(String oldId, String newId) throws Exception
{
return null;
}


/**
* Change the id of a Session.
Expand All @@ -121,10 +102,7 @@ default Session renewSessionId(String oldId, String newId) throws Exception
* @return the Session after changing its id
* @throws Exception if any error occurred
*/
default Session renewSessionId(String oldId, String newId, String oldExtendedId, String newExtendedId) throws Exception
{
return renewSessionId(oldId, newId);
}
Session renewSessionId(String oldId, String newId, String oldExtendedId, String newExtendedId) throws Exception;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,17 +1372,7 @@ public void scavenge ()
}
}

/**
* @see #sessionInactivityTimerExpired(Session, long)
*/
@Deprecated
public void sessionInactivityTimerExpired (Session session)
{
//for backwards compilation compatibility only
sessionInactivityTimerExpired(session, System.currentTimeMillis());
}



/* ------------------------------------------------------------ */
/**
* Each session has a timer that is configured to go off
Expand Down

0 comments on commit 0817928

Please sign in to comment.