UserStatusExtractor
Fri Jan 27 21:07:40 KST 2006
Root Package
Class Diagrams
diagram <default>
Subpackages
package net
package Resources
package ucam
Classes
class AbstractMessenger
class DeviceProfileReader
class JSkypeOut
class Messenger
class StatusExtractorMain
Interfaces
interface MessageListenerInterface
Class Diagrams
Class Diagram <default>
package: <default>
Package Nodes
net
Resources
Class Nodes
AbstractMessenger
DeviceProfileReader
JSkypeOut
Messenger
StatusExtractorMain
Interface Nodes
MessageListenerInterface
Package Node Detail
Package Resources
Package net
Class Detail
Class AbstractMessenger
public abstract class AbstractMessenger
Copyright (C) 2004 B. Lamot


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

This library 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
Lesser General Public License for more details.



A basic implementation all Messengers need, the listener method are implemented.
The sendMessage method should be overridden.
Field Summary
private HashSet
   Placeholder for the listeners that want to be notified on a received message.
 
Method Summary
public void
   This method adds a listener, which will be triggered when a message is received.
 
public abstract void
   Terminate this messenger and let it clean-up it's trash (jni trash or sockets and stuff).
 
public abstract boolean
   Used to initialize the platform specific initialisation.
 
protected final void
onMessageReceived(String message)
   To be called by the messengers that extend this class.
 
public final void
   Removes a previously added listener.
 
public abstract boolean
sendMessage(String message)
   Messengers should override this method with their sendMessage implementation, dependant on the platform.
 
Field Detail
listeners
private HashSet listeners = new HashSet(5)
Placeholder for the listeners that want to be notified on a received message.
Method Detail
addListener
public void addListener(MessageListenerInterface listener)
This method adds a listener, which will be triggered when a message is received.
Parameters:
listener the listener which has to be added.

destroy
public abstract void destroy()
Terminate this messenger and let it clean-up it's trash (jni trash or sockets and stuff).

initialize
public abstract boolean initialize()
Used to initialize the platform specific initialisation.
Returns:
false if initialisation went wrong.

onMessageReceived
protected final void onMessageReceived(String message)
To be called by the messengers that extend this class.
This will fire all the listeners.
Parameters:
message the message the listeners have to be fired with.

removeListener
public final void removeListener(MessageListenerInterface listener)
Removes a previously added listener.
Parameters:
listener the listener that needs to be removed.

sendMessage
public abstract boolean sendMessage(String message)
Messengers should override this method with their sendMessage implementation, dependant on the platform.
Parameters:
message the message to send.
Returns:
false if message could not be send.
Class Messenger
net.lamot.java.jskype.general.AbstractMessenger
  |
  +--net.lamot.java.jskype.windows.Messenger
public class Messenger
Extends:
net.lamot.java.jskype.general.AbstractMessenger
Copyright (C) 2004 B. Lamot


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

This library 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
Lesser General Public License for more details.



Basic class needed to load the dll and stuff....
Maybe to be named differently later, i couldnt think of a good name right now
Field Summary
private static Vector
private static Messenger
Method Summary
public void
public boolean
private static native synchronized int
private static native synchronized int
private static native synchronized int
nativeSendMessage(String message)
public static void
onCallback(int skypeID, String message)
   This method is called by the dll when a skype message is received.
 
public static void
   Called by the dll when a skype instance is found.
 
public boolean
sendMessage(String message)
Field Detail
listeners
private static Vector listeners = new Vector()

_instance
private static Messenger _instance = null
Method Detail
destroy
public void destroy()

initialize
public boolean initialize()

nativeDestroy
private static native synchronized int nativeDestroy()
Throws:
UnsatisfiedLinkError

nativeInit
private static native synchronized int nativeInit()
Throws:
UnsatisfiedLinkError

nativeSendMessage
private static native synchronized int nativeSendMessage(String message)
Throws:
UnsatisfiedLinkError

onCallback
public static void onCallback(int skypeID, String message)
This method is called by the dll when a skype message is received.
Parameters:
skypeID the ID of the Skype instance
message the message received

onSkypeFound
public static void onSkypeFound()
Called by the dll when a skype instance is found.

sendMessage
public boolean sendMessage(String message)
Class DeviceProfileReader
public class DeviceProfileReader
This class is ready to manage the profile information.

Since:
J2SDK1.5
Version:
ubi-UCAM 2.0 (ubiSensor)
Author:
Yoosoo Oh
Field Summary
public String
   Instance of String for the location of this computer that is installed Skype messanger
 
public String
   Instance of String for the name of this computer that is installed Skype messanger
 
Constructor Summary
public
   It initializes a newly DeviceProfileReader Object.
 
Method Summary
public String
   This method returns the IP address of this computer.
 
public String
   This method returns the name of this computer.
 
private void
   This method is to get the status of this computer.
 
public String
   This method is to get the user's login ID of this computer.
 
Field Detail
com_location
public String com_location = null
Instance of String for the location of this computer that is installed Skype messanger

com_name2
public String com_name2 = null
Instance of String for the name of this computer that is installed Skype messanger
Constructor Detail
DeviceProfileReader
public DeviceProfileReader()
It initializes a newly DeviceProfileReader Object.

Method Detail
getComputerAddress
public String getComputerAddress()
This method returns the IP address of this computer.

getComputerName
public String getComputerName()
This method returns the name of this computer.

GetPCStatus
private void GetPCStatus()
This method is to get the status of this computer.
Property: OS Name, Language, Login ID, Computer Name, IP Address, Computer Location

getUserName
public String getUserName()
This method is to get the user's login ID of this computer.
Class JSkypeOut
public class JSkypeOut
Implements:
net.lamot.java.jskype.general.MessageListenerInterface
This class is ready to extract the status Skype messanger.


The MessageListenerInterface interface defines a method onMessageReceived suppose
to be called when notifications are received from run-time Skype Client.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0 (ubiSensor)
Author:
Yoosoo Oh
Field Summary
private Communicator
   Instance of Communicator Class for multicasting
 
private String
   Instance of String for the current status of Skype messanger
 
   Instance of AbstractMessenger Class declare a messenger object to be used to send Skype commands
 
private Context5W1H
   Instance of Context5W1H Class for Context Representation
 
private String
   Instance of String for the previous status of Skype messanger
 
   Instance of DeviceProfileReader Class for the profile information
 
private String
   Instance of String for the user's identity of Skype messanger
 
Constructor Summary
public
   It initializes a newly JSkypeOut Object.
 
Method Summary
private void
   This method is to initialize the status of Preliminary Context.
 
public void
onMessageReceived(String rec_msg)
   This method is to receive any notifications through JSkype.
 
public void
SendCommandMsg(String message)
   This method is to send the Skype API text command.
 
public void
   This method is to send Preliminary Context to multicasting group.
 
Field Detail
COMM
private Communicator COMM
Instance of Communicator Class for multicasting

curstatus
private String curstatus
Instance of String for the current status of Skype messanger

msgr
private AbstractMessenger msgr
Instance of AbstractMessenger Class declare a messenger object to be used to send Skype commands

pcontext
private Context5W1H pcontext
Instance of Context5W1H Class for Context Representation

prestatus
private String prestatus
Instance of String for the previous status of Skype messanger

profile
private DeviceProfileReader profile
Instance of DeviceProfileReader Class for the profile information

skypeID
private String skypeID
Instance of String for the user's identity of Skype messanger
Constructor Detail
JSkypeOut
public JSkypeOut()
It initializes a newly JSkypeOut Object.

Method Detail
context_init
private void context_init()
This method is to initialize the status of Preliminary Context.

onMessageReceived
public void onMessageReceived(String rec_msg)
This method is to receive any notifications through JSkype.
Parameters:
rec_msg String: the received message from Skype

SendCommandMsg
public void SendCommandMsg(String message)
This method is to send the Skype API text command.
Parameters:
message String: the command to be sended to Skype

sendContext
public void sendContext()
This method is to send Preliminary Context to multicasting group.
Class StatusExtractorMain
public class StatusExtractorMain
This class is ready to extract a user's status (PC_Status & Skype_Status).

Since:
J2SDK1.5
Version:
ubi-UCAM 2.0 (ubiSensor)
Author:
Yoosoo Oh
Inner Class Summary
private final static class
StatusExtractorMain.GetThread
   This class is Thread for JSkype & Sending Context (every 10 second).
 
Field Summary
private JSkypeOut
   Instance of JSkypeOut Class
 
private static boolean
   Instance of boolean for control Thread
 
Constructor Summary
public
   It initializes a newly StatusExtractorMain Object.
 
Method Summary
private void
   This method is to get the status of Skype messanger.
 
public void
run()
public static void
main(String args)
   This method is a main for UserStatusExtractor.
 
Field Detail
jskype
private JSkypeOut jskype
Instance of JSkypeOut Class

thread_flag
private static boolean thread_flag
Instance of boolean for control Thread
Constructor Detail
StatusExtractorMain
public StatusExtractorMain()
It initializes a newly StatusExtractorMain Object.

Method Detail
GetJSkypeStaus
private void GetJSkypeStaus()
This method is to get the status of Skype messanger.

main
public static void main(String args)
This method is a main for UserStatusExtractor.
Parameters:
args the command line arguments
Interface Detail
Interface MessageListenerInterface
All Known Implementing Classes:
JSkypeOut
public interface MessageListenerInterface
Copyright (C) 2004 B. Lamot


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

This library 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
Lesser General Public License for more details.



Implement this listener when you want to be notified on received messages.
Use the Messenger.addListener(listener).
Method Summary
public void
onMessageReceived(String message)
   This method will be called when e message is received.
 
Method Detail
onMessageReceived
public void onMessageReceived(String message)
This method will be called when e message is received.
Parameters:
message
Package net
Class Diagrams
diagram net
Subpackages
package net.lamot
Class Diagrams
Class Diagram net
package: net
Package Nodes
lamot
Package Node Detail
Package net.lamot
Package net.lamot
Class Diagrams
diagram lamot
Subpackages
package net.lamot.java
Class Diagrams
Class Diagram lamot
package: net.lamot
Package Nodes
java
Package Node Detail
Package net.lamot.java
Package net.lamot.java
Class Diagrams
diagram java
Subpackages
package net.lamot.java.jskype
Class Diagrams
Class Diagram java
package: net.lamot.java
Package Nodes
jskype
Package Node Detail
Package net.lamot.java.jskype
Package net.lamot.java.jskype
Class Diagrams
diagram jskype
Subpackages
package net.lamot.java.jskype.general
package net.lamot.java.jskype.windows
Class Diagrams
Class Diagram jskype
package: net.lamot.java.jskype
Package Nodes
general
windows
Package Node Detail
Package net.lamot.java.jskype.general
Package net.lamot.java.jskype.windows
Package net.lamot.java.jskype.general
Class Diagrams
diagram general
Classes
class AbstractMessenger
Interfaces
interface MessageListenerInterface
Class Diagrams
Class Diagram general
package: net.lamot.java.jskype.general
Class Nodes
AbstractMessenger
Interface Nodes
MessageListenerInterface
Class Detail
Class AbstractMessenger
package: net.lamot.java.jskype.general
java.lang.Object
  |
  +--net.lamot.java.jskype.general.AbstractMessenger
public abstract class AbstractMessenger
Extends:
java.lang.Object
Field Summary
private HashSet
Constructor Summary
public
Method Summary
public void
public abstract void
public abstract boolean
protected final void
public final void
public abstract boolean
sendMessage(String )
Field Detail
listeners
private HashSet listeners
Constructor Detail
AbstractMessenger
public AbstractMessenger()
Method Detail
addListener
public void addListener(MessageListenerInterface )

destroy
public abstract void destroy()

initialize
public abstract boolean initialize()

onMessageReceived
protected final void onMessageReceived(String )

removeListener
public final void removeListener(MessageListenerInterface )

sendMessage
public abstract boolean sendMessage(String )
Interface Detail
Interface MessageListenerInterface
package: net.lamot.java.jskype.general
public interface MessageListenerInterface
Method Summary
public void
Method Detail
onMessageReceived
public void onMessageReceived(String )
Package net.lamot.java.jskype.windows
Class Diagrams
diagram windows
Classes
class Messenger
Class Diagrams
Class Diagram windows
package: net.lamot.java.jskype.windows
Class Nodes
Messenger
Class Detail
Class Messenger
package: net.lamot.java.jskype.windows
net.lamot.java.jskype.general.AbstractMessenger
  |
  +--net.lamot.java.jskype.windows.Messenger
public class Messenger
Extends:
net.lamot.java.jskype.general.AbstractMessenger
Field Summary
private static Vector
private static Messenger
Constructor Summary
public
Method Summary
public void
public boolean
private static native synchronized int
private static native synchronized int
private static native synchronized int
public static void
onCallback(int , String )
public static void
public boolean
sendMessage(String )
Field Detail
listeners
private static Vector listeners

_instance
private static Messenger _instance
Constructor Detail
Messenger
public Messenger()
Method Detail
destroy
public void destroy()

initialize
public boolean initialize()

nativeDestroy
private static native synchronized int nativeDestroy()

nativeInit
private static native synchronized int nativeInit()

nativeSendMessage
private static native synchronized int nativeSendMessage(String )

onCallback
public static void onCallback(int , String )

onSkypeFound
public static void onSkypeFound()

sendMessage
public boolean sendMessage(String )
Package Resources
Class Diagrams
diagram Resources
Subpackages
package Resources.lib
package Resources.StatusProfile
Class Diagrams
Class Diagram Resources
package: Resources
Package Nodes
lib
StatusProfile
Package Node Detail
Package Resources.lib
Package Resources.StatusProfile
Package Resources.lib
Class Diagrams
diagram lib
Class Diagrams
Class Diagram lib
package: Resources.lib
Package Resources.StatusProfile
Class Diagrams
diagram StatusProfile
Class Diagrams
Class Diagram StatusProfile
package: Resources.StatusProfile