| Trees | Index | Help |
|
|---|
| Package svs_core :: Package network :: Module clientuser :: Class GenericClient |
|
Jellyable--+ |Serializable--+ |Referenceable--+ | GenericClient
ScriptableClientGenericClient provides the basic client capabilities for SVS clients. It is able to connect to a cluster, retrieve data and disconnect from a cluster but little else.
Specialised client types extend from this class to provide more capabilities.
When talking to server, communicate with avatar. When talking to other clients, communicate with clusterGroup.
Callbacks from message to avatar start with 'avatarResult_'. Callbacks from message to clusterGroup start with 'groupResult_'.| Method Summary | |
|---|---|
__init__(self,
name,
passwd)
| |
Places advert for services on server. | |
Received result of clearDepositedData from avatar. | |
Receives result of depositData from avatar. | |
Handles result of joinClusterGroup action. | |
Handles result of leaveCluster action. | |
Callback for notifyListeners method. | |
Received result of retrieveOwnData from avatar. | |
Empties cache of data deposits held by avatar. | |
Empties cache of data deposits held by client. | |
Connect to server. | |
Sends data packet to avatar on server where it is cached for other clients to collect. | |
Disconnect from cluster. | |
Handles error messages for client. | |
Retrieves data from specified source on cluster, and performs 'callback' on receipt. | |
Allows speacialised handling of labelled data. | |
Retrieves a list of all clients currently connected to cluster group. | |
Retrieves local data from cache. | |
Returns name of client. | |
Retrieves profile for specified client from server. | |
Handles receievd list of clients in group. | |
Receives result of getData from avatar. | |
Receives profile requested from other client. | |
Callback for listenTo method. | |
Callback for sendChatMessage method. | |
Receives result of sendData from avatar. | |
Receives result of sendDataResult from avatar. | |
Callback for listenTo method. | |
Callback for stopListeningTo method. | |
Callback for stopListeningTo method. | |
Handles data packet received from network. | |
Deals with received list of group members. | |
Responds notification of request for profile. | |
Performs actions in response to profile receievd from another client. | |
Called after a client has succesfully joined a cluster group. | |
Client attempts to join cluster group. | |
Client leaves cluster. | |
Handles log messages for client. | |
Forward data to listeners. | |
Handles error message sent from client proxy on server. | |
Retrieves profile for cleint | |
Responds to request for data from another client. | |
Receives notification packets from other clients to which this has registered as listener. | |
Receives name of other client that has requested this client's profile. | |
Receives chat message from other clients. | |
Handles data sent from client proxy on server. | |
Handles data sent, inside makeCommandResult, from client proxy on server. | |
Handles status message sent from client proxy on server. | |
Handles update sent from client proxy on server. | |
Called by server when connection made. | |
Collects previously deposited data packet from avatar. | |
Queries server for clients responding to specified command names. | |
Queries server for clients responding to specified method names. | |
Queries server for clients providing specified services. | |
Queries server for clients using specified services. | |
Generic handler for searching client profiles. | |
Sends chat message to other clients. | |
Sends data to another client. | |
Sends data to another client. | |
Sends HTTP request to specified URL. | |
Add delegate class for handling work tasks on client. | |
Called by the server when it shuts down. | |
Register as listener with another client. | |
Register as listener to network processes. | |
Handles status messages for client. | |
De-register as listener with another client. | |
De-register as listener to network processes. | |
Stores local data in cache. | |
| Inherited from Referenceable | |
(internal) | |
A remote message has been received. | |
| Inherited from Serializable | |
Return an ID which uniquely represents this object for this process. | |
| Inherited from Jellyable | |
| |
| Instance Variable Summary | |
|---|---|
| object | avatar: proxy class for cluster supplied by server |
| string | clientName: name for client (uses class name as default) |
| string | clientPassword: password for client (uses class signature as default) |
| string | clusterGroupName: name of cluster group |
| dict | dataCache: store for temporary data |
| boolean | logging: flag to turn logging output on and off |
ClientProfile |
profile: client profile |
| object | worker: plugin class for handling specialised processes |
| Class Variable Summary | |
|---|---|
| Inherited from Referenceable | |
Implements |
__implemented__ = <implementedBy twisted.spread.flavors....
|
_implementsTuple |
__implements__ = (<MetaInterface twisted.spread.interfac...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
NoneType |
perspective = None |
| Inherited from Jellyable | |
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
| Method Details |
|---|
advertise(self, advertPacket)Places advert for services on server. |
avatarResult_clearDepositedData(self, result)Received result ofclearDepositedData from avatar.
|
avatarResult_depositData(self, result)Receives result ofdepositData from avatar.
|
avatarResult_joinClusterGroup(self, group)Handles result ofjoinClusterGroup action.
|
avatarResult_leaveCluster(self, result)Handles result ofleaveCluster action.
|
avatarResult_notifyListeners(self, result)Callback fornotifyListeners method.
|
avatarResult_retrieveOwnData(self, result)Received result ofretrieveOwnData from avatar.
|
clearDepositedData(self, label=None)Empties cache of data deposits held by avatar. UsesavatarResult_clearDepositedData as
callback.
|
clearLocalData(self, label=None)Empties cache of data deposits held by client. If a label is specified then only data stored under that label is removed. |
connect(self, group, host, port)Connect to server.
|
depositData(self, dataPacket)Sends data packet to avatar on server where it is cached for other clients to collect. |
disconnect(self)Disconnect from cluster. |
errorMessage(self, text)Handles error messages for client. This should be overridden by implementing classes.
|
getData(self, dataRequest)Retrieves data from specified source on cluster, and performs 'callback' on receipt. This method may often be used by delegate worker classes. UsesgroupResult_getData as callback.
|
getDataForLabel(self, dataRequest)Allows speacialised handling of labelled data. This can be overridden by extending classes to provide custom methods for providing requested data. |
getGroupMembers(self)Retrieves a list of all clients currently connected to cluster group. |
getLocalData(self, label=None)Retrieves local data from cache. |
getName(self)Returns name of client. |
getProfileForClient(self, clientName)Retrieves profile for specified client from server. |
groupResult_getClientList(self, result)Handles receievd list of clients in group.
|
groupResult_getData(self, result)Receives result ofgetData from avatar.
|
groupResult_getProfileForClient(self, commandResult)Receives profile requested from other client. |
groupResult_listenTo(self, result)Callback forlistenTo method.
|
groupResult_sendChatMessage(self, result)Callback forsendChatMessage method.
|
groupResult_sendData(self, result)Receives result ofsendData from avatar.
|
groupResult_sendDataResult(self, result)Receives result ofsendDataResult from avatar.
|
groupResult_startListeningToProcess(self, result)Callback forlistenTo method.
|
groupResult_stopListeningTo(self, result)Callback forstopListeningTo method.
|
groupResult_stopListeningToProcess(self, result)Callback forstopListeningTo method.
|
handleDataPacket(self, dataPacket)Handles data packet received from network. |
handleGroupMemberList(self, groupList)Deals with received list of group members. This can be overridden by implementing clients. |
handleProfileRequest(self, requester)Responds notification of request for profile. |
handleReceivedProfile(self, profile)Performs actions in response to profile receievd from another client. This should be overidden to provide desired functionality for extending clients. |
haveJoinedClusterGroup(self)Called after a client has succesfully joined a cluster group. This does nothing by itself but can be overidden by extending clients to handle any actions necessary at this point. |
joinClusterGroup(self)Client attempts to join cluster group. If succesful, it will be added to a list of similar client types also currently connected. This list is returned in the callback methodjoinClusterResult.
|
leaveCluster(self)Client leaves cluster. On the server side it will be removed from the list of clients it was previously grouped with. This list is returned in the callback methodleaveClusterResult.
|
logMessage(self, text)Handles log messages for client. Log messages can be turned on and off. This should be overridden by implementing classes.
|
notifyListeners(self, dataPacket)Forward data to listeners. UsesavatarResult_notifyListeners as
callback.
|
remote_errorMessage(self, message)Handles error message sent from client proxy on server.
|
remote_getProfile(self)Retrieves profile for cleint |
remote_handleDataRequest(self, dataRequest)Responds to request for data from another client. |
remote_notify(self, notification)Receives notification packets from other clients to which this has registered as listener. |
remote_profileRequested(self, requester)Receives name of other client that has requested this client's profile. |
remote_receiveChatMessage(self, msgPacket)Receives chat message from other clients. |
remote_receiveData(self, dataPacket)Handles data sent from client proxy on server.
|
remote_receiveDataResult(self, cmdResult)Handles data sent, inside makeCommandResult, from client proxy on server.
|
remote_statusMessage(self, message)Handles status message sent from client proxy on server.
|
remote_update(self, time)Handles update sent from client proxy on server.
|
result_connected(self, perspective)Called by server when connection made. This passes aperspective object. This is a reference
to the server connection which is used for invoking remote calls on the
server.
|
retrieveOwnData(self, dataRequest)Collects previously deposited data packet from avatar. UsesavatarResult_retrieveOwnData as
callback.
|
searchForCommands(self, commandList)Queries server for clients responding to specified command names. |
searchForMethods(self, methodsList)Queries server for clients responding to specified method names. |
searchForServices(self, serviceList)Queries server for clients providing specified services. |
searchForUsers(self, serviceList)Queries server for clients using specified services. |
searchProfiles(self, profileRequest)Generic handler for searching client profiles. |
sendChatMessage(self, msgPacket)Sends chat message to other clients. |
sendData(self, dataPacket)Sends data to another client. UsesgroupResult_sendData as callback.
|
sendDataResult(self, dataResult)Sends data to another client. UsesgroupResult_sendData as callback.
|
sendHttpRequest(self, url, method=None)Sends HTTP request to specified URL. |
setWorker(self, worker)Add delegate class for handling work tasks on client. |
shutdown(self, result)Called by the server when it shuts down. |
startListeningTo(self, sourceClient, listenFor=None)Register as listener with another client. |
startListeningToProcess(self, listenFor)Register as listener to network processes. |
statusMessage(self, text)Handles status messages for client. This should be overridden by implementing classes.
|
stopListeningTo(self, sourceClient, listenFor=None)De-register as listener with another client. |
stopListeningToProcess(self, listenFor)De-register as listener to network processes. |
storeLocalData(self, dataPacket)Stores local data in cache. Data is stored as DataPacket. |
| Instance Variable Details |
|---|
avatarproxy class for cluster supplied by server
|
clientNamename for client (uses class name as default)
|
clientPasswordpassword for client (uses class signature as default)
|
clusterGroupNamename of cluster group
|
dataCachestore for temporary data
|
loggingflag to turn logging output on and off
|
profileclient profile
|
workerplugin class for handling specialised processes
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 | http://epydoc.sf.net |