[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous SASLAnonymou
Status: Beta
Brought to you by:
huston
|
From: Huston F. <hu...@us...> - 2002-10-05 15:31:52
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous
In directory usw-pr-cvs1:/tmp/cvs-serv7651/src/org/beepcore/beep/profile/sasl/anonymous
Modified Files:
SASLAnonymousProfile.java AnonymousAuthenticator.java
Log Message:
changed to use commons-logging
Index: SASLAnonymousProfile.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous/SASLAnonymousProfile.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** SASLAnonymousProfile.java 22 Aug 2002 18:11:22 -0000 1.7
--- SASLAnonymousProfile.java 5 Oct 2002 15:31:49 -0000 1.8
***************
*** 23,31 ****
import sun.misc.BASE64Encoder;
import org.beepcore.beep.core.*;
import org.beepcore.beep.profile.*;
import org.beepcore.beep.profile.sasl.*;
- import org.beepcore.beep.transport.tcp.*;
- import org.beepcore.beep.util.*;
--- 23,32 ----
import sun.misc.BASE64Encoder;
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
+
import org.beepcore.beep.core.*;
import org.beepcore.beep.profile.*;
import org.beepcore.beep.profile.sasl.*;
***************
*** 58,61 ****
--- 59,64 ----
private static SASLAnonymousProfile instance = null;
+ private Log log = LogFactory.getLog(this.getClass());
+
public SASLAnonymousProfile()
{
***************
*** 99,104 ****
throws StartChannelException
{
! Log.logEntry(Log.SEV_DEBUG, this.getClass().toString(),
! "SASLAnonymousProfile.startChannel");
clearCredential(channel.getSession(), this);
Session t = channel.getSession();
--- 102,106 ----
throws StartChannelException
{
! log.debug("SASLAnonymousProfile.startChannel");
clearCredential(channel.getSession(), this);
Session t = channel.getSession();
***************
*** 110,115 ****
data = blob.getData();
! Log.logEntry(Log.SEV_DEBUG,
! "SASLAnon...User claims to be=>" + data);
finishListenerAuthentication(SASLAnonymousProfile.generateCredential(data),
t);
--- 112,118 ----
data = blob.getData();
! if (log.isDebugEnabled()) {
! log.debug("SASLAnon...User claims to be=>" + data);
! }
finishListenerAuthentication(SASLAnonymousProfile.generateCredential(data),
t);
***************
*** 220,225 ****
new Blob(Blob.STATUS_NONE, id).toString(),
null);
-
- Log.logEntry(Log.SEV_DEBUG, "Got start data of " + ch.getStartData());
if ((ch.getStartData() != null)
--- 223,226 ----
Index: AnonymousAuthenticator.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous/AnonymousAuthenticator.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** AnonymousAuthenticator.java 10 Nov 2001 21:33:29 -0000 1.12
--- AnonymousAuthenticator.java 5 Oct 2002 15:31:49 -0000 1.13
***************
*** 24,29 ****
import java.util.StringTokenizer;
import org.beepcore.beep.core.*;
- import org.beepcore.beep.util.*;
import org.beepcore.beep.profile.sasl.*;
--- 24,31 ----
import java.util.StringTokenizer;
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
+
import org.beepcore.beep.core.*;
import org.beepcore.beep.profile.sasl.*;
***************
*** 69,72 ****
--- 71,76 ----
// Data
+ private Log log = LogFactory.getLog(this.getClass());
+
private int state;
private Channel channel;
***************
*** 96,101 ****
AnonymousAuthenticator(SASLAnonymousProfile anonymousProfile)
{
! Log.logEntry(Log.SEV_DEBUG,
! "Creating Listener ANONYMOUS Authenticator");
credential = new Hashtable();
--- 100,104 ----
AnonymousAuthenticator(SASLAnonymousProfile anonymousProfile)
{
! log.debug("Creating Listener ANONYMOUS Authenticator");
credential = new Hashtable();
***************
*** 125,130 ****
throws SASLException
{
! Log.logEntry(Log.SEV_DEBUG,
! "Starting Anonymous Authenticator");
if (state != STATE_UNKNOWN) {
--- 128,132 ----
throws SASLException
{
! log.debug("Starting Anonymous Authenticator");
if (state != STATE_UNKNOWN) {
***************
*** 158,163 ****
throws SASLException
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator Receiving ID");
// If we're listening, the last state we should
--- 160,164 ----
throws SASLException
{
! log.debug("Anonymous Authenticator Receiving ID");
// If we're listening, the last state we should
***************
*** 199,212 ****
throws SASLException
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator sending Identity");
if(authenticateId==null)
throw new SASLException(ERR_IDENTITY_PARSE_FAILURE);
! Log.logEntry(Log.SEV_DEBUG,
! "Using=>" + authenticateId + "<=");
Blob blob = new Blob(Blob.STATUS_NONE, authenticateId);
! Log.logEntry(Log.SEV_DEBUG, "Using=>" + blob.toString() + "<=");
try {
credential.put(SessionCredential.AUTHENTICATOR, authenticateId);
--- 200,215 ----
throws SASLException
{
! log.debug("Anonymous Authenticator sending Identity");
if(authenticateId==null)
throw new SASLException(ERR_IDENTITY_PARSE_FAILURE);
! if (log.isDebugEnabled()) {
! log.debug("Using=>" + authenticateId + "<=");
! }
Blob blob = new Blob(Blob.STATUS_NONE, authenticateId);
! if (log.isDebugEnabled()) {
! log.debug("Using=>" + blob.toString() + "<=");
! }
try {
credential.put(SessionCredential.AUTHENTICATOR, authenticateId);
***************
*** 226,231 ****
throws SASLException
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator Completing!");
// If we're initiating, the last state we should
--- 229,233 ----
throws SASLException
{
! log.debug("Anonymous Authenticator Completing!");
// If we're initiating, the last state we should
***************
*** 253,259 ****
throws SASLException
{
! Log.logEntry(Log.SEV_DEBUG,
! "Aborting Anonymous Authenticator");
! Log.logEntry(Log.SEV_DEBUG, msg);
state = STATE_ABORT;
throw new SASLException(msg);
--- 255,260 ----
throws SASLException
{
! log.debug("Aborting Anonymous Authenticator");
! log.debug(msg);
state = STATE_ABORT;
throw new SASLException(msg);
***************
*** 262,268 ****
void abortNoThrow(String msg)
{
! Log.logEntry(Log.SEV_DEBUG,
! "Aborting Anonymous Authenticator");
! Log.logEntry(Log.SEV_DEBUG, msg);
state = STATE_ABORT;
}
--- 263,268 ----
void abortNoThrow(String msg)
{
! log.debug("Aborting Anonymous Authenticator");
! log.debug(msg);
state = STATE_ABORT;
}
***************
*** 284,289 ****
try
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator.receiveMSG");
String data = null;
Blob blob = null;
--- 284,288 ----
try
{
! log.debug("Anonymous Authenticator.receiveMSG");
String data = null;
Blob blob = null;
***************
*** 301,308 ****
data = blob.getData();
} catch (IOException x) {
! Log.logEntry(Log.SEV_ERROR, x);
abort(x.getMessage());
}
! Log.logEntry(Log.SEV_DEBUG, "MSG DATA=>" + data);
String status = blob.getStatus();
--- 300,309 ----
data = blob.getData();
} catch (IOException x) {
! log.error("", x);
abort(x.getMessage());
}
! if (log.isDebugEnabled()) {
! log.debug("MSG DATA=>" + data);
! }
String status = blob.getStatus();
***************
*** 353,358 ****
public void receiveRPY(Message message)
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator.receiveRPY");
Blob blob = null;
--- 354,358 ----
public void receiveRPY(Message message)
{
! log.debug("Anonymous Authenticator.receiveRPY");
Blob blob = null;
***************
*** 377,385 ****
String status = blob.getStatus();
! if ((status != null)
! && status.equals(SASLProfile.SASL_STATUS_ABORT)) {
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator receiveRPY=>"
! + blob.getData());
sendAbort = false;
abort(ERR_PEER_ABORTED);
--- 377,385 ----
String status = blob.getStatus();
! if ((status != null) &&
! status.equals(SASLProfile.SASL_STATUS_ABORT))
! {
! log.debug("Anonymous Authenticator receiveRPY=>"
! + blob.getData());
sendAbort = false;
abort(ERR_PEER_ABORTED);
***************
*** 407,411 ****
catch(SASLException x)
{
! Log.logEntry(Log.SEV_ERROR, x);
synchronized (this) {
this.notify();
--- 407,411 ----
catch(SASLException x)
{
! log.error(x);
synchronized (this) {
this.notify();
***************
*** 440,445 ****
public void receiveERR(Message message)
{
! Log.logEntry(Log.SEV_DEBUG,
! "Anonymous Authenticator.receiveERR");
try {
--- 440,444 ----
public void receiveERR(Message message)
{
! log.debug("Anonymous Authenticator.receiveERR");
try {
***************
*** 449,455 ****
is.read(buff);
! Log.logEntry(Log.SEV_DEBUG,
! "SASL-Anonymous Authentication ERR received=>\n" +
! new String(buff));
abortNoThrow(new String(buff));
--- 448,455 ----
is.read(buff);
! if (log.isDebugEnabled()) {
! log.debug("SASL-Anonymous Authentication ERR received=>\n" +
! new String(buff));
! }
abortNoThrow(new String(buff));
|