xinca.components
Class XWebLog

java.lang.Object
  |
  +--xinca.components.XWebLog
All Implemented Interfaces:
edu.gatech.coc.inca.arch.module.Accessor, edu.gatech.coc.inca.arch.constants.AttributeConstants, edu.gatech.coc.inca.arch.module.Capturer, Constants, edu.gatech.coc.inca.arch.net.WebProxyListener

public class XWebLog
extends java.lang.Object
implements edu.gatech.coc.inca.arch.module.Capturer, edu.gatech.coc.inca.arch.module.Accessor, Constants, edu.gatech.coc.inca.arch.net.WebProxyListener

The xINCA xWebLog component - a proxy web logger system.

Copyright (c) 2002 ICMC-USP.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

Since:
JDK1.4
Author:
Valter dos Reis Inácio Jr, Renan Gonçalves Cattelan

Field Summary
 
Fields inherited from interface edu.gatech.coc.inca.arch.constants.AttributeConstants
ATTRIBUTE_NAME__APPLICATION, ATTRIBUTE_NAME__APPLICATION_EVENT, ATTRIBUTE_NAME__CONTEXT_TYPE, ATTRIBUTE_NAME__DATA_TYPE, ATTRIBUTE_NAME__EVENT, ATTRIBUTE_NAME__LOCATION, ATTRIBUTE_NAME__PERSON, ATTRIBUTE_NAME__TIMESTAMP, ATTRIBUTE_VALUE__AUDIO_DATA, ATTRIBUTE_VALUE__PEOPLE_PRESENT_CONTEXT, ATTRIBUTE_VALUE__VIDEO_DATA
 
Fields inherited from interface xinca.constants.Constants
CHAT_TOKEN, DEFAULT_BOARD_HEIGHT, DEFAULT_BOARD_WIDTH, DEFAULT_INCAD_HOST, DEFAULT_SESSION_ID, DEFAULT_SLIDE_ID, DEFAULT_STROKE_ID, DEFAULT_STROKE_WIDTH, JUMP_TO_TOKEN, NEW_SLIDE_TOKEN, PROXY_PORT, RECEIVE_STROKE_TOKEN, SLIDE_FROM_IMAGE_URL_TOKEN, SOUND_TOKEN, SOUND_TRANSMISSION_PACKAGE_SIZE, THICK_STROKE, THIN_STROKE, VIDEO_TOKEN, VIDEO_TRANSMISSION_PACKAGE_SIZE, WEBLOG_TOKEN, WHITEBOARD_TOKEN
 
Constructor Summary
XWebLog(int sessionID, xinca.components.XWebLogListener xWebLogListener, int port, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XWebLog(int sessionID, xinca.components.XWebLogListener xWebLogListener, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XWebLog(int sessionID, xinca.components.XWebLogListener xWebLogListener, java.lang.String host, int port, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XWebLog(int sessionID, xinca.components.XWebLogListener xWebLogListener, java.lang.String host, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XWebLog(xinca.components.XWebLogListener xWebLogListener, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
 
Method Summary
 common.data.Weblogml getWebLogml()
          This method gets the weblogml member
 void handle(edu.gatech.coc.inca.arch.data.DataObject data_object)
          Callback method to handle a data_object this accessor is being notified of
 void handle(edu.gatech.coc.inca.arch.data.DataVector data_vector)
          Callback method to handle a data_vector this accessor is being notified of
 boolean handle(java.lang.String request, java.lang.String url, java.lang.String referer, java.lang.String post_content, java.lang.String client_address, java.io.OutputStream client_outstream, edu.gatech.coc.inca.arch.net.WebProxy proxy, boolean handled)
          Callback method to handle proxy connections
 void setWebLogml(common.data.Weblogml webLogml)
          This method sets the weblogml member
 void stateChanged(edu.gatech.coc.inca.arch.module.AccessModule module, boolean ready)
          Callback method to the state change of the access module
 void stateChanged(edu.gatech.coc.inca.arch.module.CaptureModule module, boolean ready)
          Callback method to the state change of the capture module
 void update(edu.gatech.coc.inca.arch.data.DataObject old_data, edu.gatech.coc.inca.arch.data.DataObject new_data)
          Callback method to indicate a update event in the capture module
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XWebLog

public XWebLog(xinca.components.XWebLogListener xWebLogListener,
               java.lang.String username,
               boolean captureOn,
               boolean accessOn)
Constructor

Parameters:
xWebLogListener - is the XWebLogListener listening this module
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XWebLog

public XWebLog(int sessionID,
               xinca.components.XWebLogListener xWebLogListener,
               java.lang.String username,
               boolean captureOn,
               boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xWebLogListener - is the XWebLogListener listening this module
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XWebLog

public XWebLog(int sessionID,
               xinca.components.XWebLogListener xWebLogListener,
               int port,
               java.lang.String username,
               boolean captureOn,
               boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xWebLogListener - is the XWebLogListener listening this module
port - is the InCAd port
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XWebLog

public XWebLog(int sessionID,
               xinca.components.XWebLogListener xWebLogListener,
               java.lang.String host,
               java.lang.String username,
               boolean captureOn,
               boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xWebLogListener - is the XWebLogListener listening this module
host - is the InCAd host
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XWebLog

public XWebLog(int sessionID,
               xinca.components.XWebLogListener xWebLogListener,
               java.lang.String host,
               int port,
               java.lang.String username,
               boolean captureOn,
               boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xWebLogListener - is the XWebLogListener listening this module
host - is the InCAd host
port - is the InCAd port
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag
Method Detail

getWebLogml

public common.data.Weblogml getWebLogml()
This method gets the weblogml member


setWebLogml

public void setWebLogml(common.data.Weblogml webLogml)
This method sets the weblogml member


stateChanged

public void stateChanged(edu.gatech.coc.inca.arch.module.CaptureModule module,
                         boolean ready)
Callback method to the state change of the capture module

Specified by:
stateChanged in interface edu.gatech.coc.inca.arch.module.Capturer
Parameters:
module - is the capture module
ready - is the boolean state of the capture module

stateChanged

public void stateChanged(edu.gatech.coc.inca.arch.module.AccessModule module,
                         boolean ready)
Callback method to the state change of the access module

Specified by:
stateChanged in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
module - is the access module
ready - is the boolean state of the access module

handle

public void handle(edu.gatech.coc.inca.arch.data.DataObject data_object)
Callback method to handle a data_object this accessor is being notified of

Parameters:
data_object - is the DataObject to handle

handle

public void handle(edu.gatech.coc.inca.arch.data.DataVector data_vector)
Callback method to handle a data_vector this accessor is being notified of

Specified by:
handle in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
data_vector - is the DataVector to handle

update

public void update(edu.gatech.coc.inca.arch.data.DataObject old_data,
                   edu.gatech.coc.inca.arch.data.DataObject new_data)
Callback method to indicate a update event in the capture module

Specified by:
update in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
old_data - is the old DataObject
new_data - is the updated DataObject

handle

public boolean handle(java.lang.String request,
                      java.lang.String url,
                      java.lang.String referer,
                      java.lang.String post_content,
                      java.lang.String client_address,
                      java.io.OutputStream client_outstream,
                      edu.gatech.coc.inca.arch.net.WebProxy proxy,
                      boolean handled)
Callback method to handle proxy connections

Specified by:
handle in interface edu.gatech.coc.inca.arch.net.WebProxyListener
Parameters:
request - is the String request from the client
url - is the String URL being requested
referer - is the String URL of the page referring this URL request
post_content - is the String content being posted (if any)
client_address - is the address name (or ip) of the client
client_outstream - is the OutputStream to the client
proxy - is the WebProxy reference
handled - is a boolean, specifying if the request has been handled or not...
Returns:
Description of the Return Value