All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class lava.net.psyc.PSYCMessageCenter

java.lang.Object
   |
   +----lava.net.psyc.PSYCMessageCenter

public class PSYCMessageCenter
extends Object

Variable Index

 o actionTag
 o addressesTag
 o assignPrefix
 o augmentPrefix
 o contentTag
 o contextTag
 o defaultPort
 o defaultProtocol
 o defaultResource
 o defaultScheme
 o descriptionTag
 o diminishPrefix
 o humanInformationTag
 o identificationTag
 o implementationTag
 o locationTag
 o maxVariables
The maximum number of permanent variables per object/context.
 o METHOD_HIERARCHY_DELIMITER
 o MINOR_VERSION_DELIMITER
 o nameObjectTag
 o nameTag
 o nicknameTag
 o ProtocolMajorVersion
 o ProtocolMinorVersion
 o ProtocolName
 o setPrefix
 o understandPackagesTag
 o understandProtocols
For greeting...
 o understandProtocolsTag
 o urlDescriptionTag
 o usingPackagesTag
 o usingProtocolsTag
 o VERSION_DELIMITER

Constructor Index

 o PSYCMessageCenter()
This creates a new instance of a message center for the PSYC protocol.
 o PSYCMessageCenter(PSYCPacketManager)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager.
 o PSYCMessageCenter(PSYCPacketManager, boolean)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager.
 o PSYCMessageCenter(PSYCPacketManager, MMPCenter)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager and the specified underlying transport manager.
 o PSYCMessageCenter(PSYCPacketManager, UNA[])
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager.

Method Index

 o addMethodAlias(String, String)
Adds a method alias to the message centers method expand buffer.
 o addPackage(PSYCPackage)
Adds a package to this message center.
 o addToContext(String, UNL)
Adds the specified remote object to the specified outgoing context.
 o addToContext(UNL)
Adds the specified remote object to an implicite given context.
Note: UNLs may contain contexts.
 o addVariableAlias(String, String)
Adds a variable alias to the message centers variable expand buffer.
 o assignLocation(UNL, UNL)
 o assignUnderstandProtocol(UNL, String)
 o assignVariable(String, String, Value, boolean)
Assigns the given Value to the specified variable for the specified outgoing context.
 o assignVariable(UNL, String, Value, boolean)
Assigns the specified variable for the specified remote object with the specified Value.
 o augmentLocation(UNL, UNL)
 o augmentUnderstandProtocol(UNL, String)
 o augmentVariable(String, String, Value, boolean)
Augments the given Value to the specified variable for the specified outgoing context.
 o augmentVariable(UNL, String, Value, boolean)
Augments the specified variable for the specified remote object with the specified Value.
 o close()
Closes this message center.
 o createContext(String)
Creates the specified outgoing context.
 o diminishLocation(UNL, UNL)
 o diminishUnderstandProtocol(UNL, String)
 o diminishVariable(String, String, Value, boolean)
Diminishes the given Value from the specified variable for the specified outgoing context.
 o diminishVariable(UNL, String, Value, boolean)
Diminishes the specified variable for the specified remote object with the specified Value.
 o getAction(UNL)
Returns a currently set action of the specified remote object (Conferencing specific stuff).
 o getActualMethod(UNL)
Returns the actual method the specified remote object has sent.
 o getAddress(UNL)
Returns the actual address for a given object.
 o getContentType(UNL)
Returns the actual content type, the specified remote object is using for its bodies.
 o getDescription(UNL)
Returns a Virtual Environment Description Language (VEDL) object description of the specified remote object.
 o getHumanInformation(UNL)
Returns a human readable description of the specified remote object.
 o getIdentification(UNL)
Returns the Uniform Network Identification of the specified remote object.
 o getImplementation(UNL)
Returns a list of platforms the specified remote object is implemented on.
 o getLocations(UNL)
Returns a list of all Uniform Network Locations of the specified remote object.
 o getMMPCenter()
Returns the underlying MMPCenter which is called by this PSYCMessageCenter.
 o getMMPPacketManager()
 o getName(UNL)
Returns the full name of the specified remote object.
 o getNickname(UNL)
Returns the Nickname of the specified remote object (Conferencing specific stuff).
 o getObject(UNA)
Returns the object for a given address.
 o getObjectName(UNL)
 o getUnderstandPackages(UNL)
Returns a list of packages the specified remote object understands.
 o getUnderstandProtocols(UNL)
Returns a list of protocols the specified remote object understands.
 o getURLDescription(UNL)
Returns the URL where the specified remote object is described on (Conferencing specific stuff - for example a home page).
 o getUsingPackages(UNL)
Returns a list of packages currently used by the specified remote object.
 o getUsingProtocols(UNL)
Returns a list of protocols currently used by the specified remote object.
 o getValue(UNL, String)
Returns the Value currently set for the specified variable by the specified remote object.
 o getVars(UNL)
Returns a list of the names of all variables currently set by the specified remote object.
 o isContext(String)
Checks, if the specified String describes an existing outgoing context.
 o queryVariable(UNL, String)
Queries the specified variable for the specified remote object.
 o removeContext(String)
Removes the specified outgoing context.
 o removeFromContext(String, UNL)
Removes the specified remote object from the specified outgoing context.
 o removeFromContext(UNL)
Removes the specified remote object from the implicite given context.
Note: UNLs may contain contexts.
 o removeMethodAlias(String)
Removes a method alias from the message centers method expand buffer.
 o removeVariable(String, String)
Removes the specified variable from the variable buffer for the specified outgoing context.
 o removeVariable(UNL, String)
Removes the specified variable currently set by the specified remote object.
 o removeVariableAlias(String)
Removes a variable alias from the message centers variable expand buffer.
 o send(String, String, String)
Sends the specified message (method and body) to the specified context.
It ignores errors if they occure in sending to single context members.
 o send(String, String, String, Hashtable)
Sends the specified message (method and body) to the specified context and sets temporarily for this message the specified variables.
 o send(UNL, String, String)
Sends the specified message (method and body) to the specified remote object.
 o send(UNL, String, String, Hashtable)
Sends the specified message (method and body) to the specified remote object and sets temporarily for this message the specified variables.
 o sendChecked(UNL, String, String, String)
Sends the specified message (method and body) to the specified remote object but only, if the object supports the specified package.
 o sendChecked(UNL, String, String, String, Hashtable)
Sends the specified message (method, body and temporarily set variables) to the specified remote object but only, if the object supports the specified package.
 o setAction(UNL, String)
 o setContentType(UNL, String)
 o setDefaults()
Sets the default values for UNA/UNL/UNI.
 o setDescription(UNL, Object)
 o setGreeting(String, String)
For greeting ...
 o setHumanInformation(UNL, String)
 o setIdentification(UNL, UNI)
 o setManager(PSYCPacketManager)
Sets the PSYCPacketManager which is called by this PSYCMessageCenter if it delivers some PSYC event.
 o setMMPCenter(MMPCenter)
Sets the underlying MMPCenter which is called by this PSYCMessageCenter.
 o setName(UNL, String)
 o setNickname(UNL, String)
 o setURLDescription(UNL, URL)
 o understandsPackage(UNL, String)
Checks, if the specified remote object understands the specified package.
 o understandsProtocol(UNL, String)
Checks, if the specified remote object understands the specified protocol.
 o usesPackage(UNL, String)
Checks, if the specified remote object uses the specified package.
 o usesProtocol(UNL, String)
Checks, if the specified remote object uses the specified protocol.

Variables

 o ProtocolName
 public static final String ProtocolName
 o ProtocolMajorVersion
 public static final int ProtocolMajorVersion
 o ProtocolMinorVersion
 public static final int ProtocolMinorVersion
 o defaultScheme
 public static final String defaultScheme
 o defaultPort
 public static final int defaultPort
 o defaultProtocol
 public static final String defaultProtocol
 o defaultResource
 public static final String defaultResource
 o maxVariables
 public static int maxVariables
The maximum number of permanent variables per object/context. This is to prevent denial of service. Numbers smaller than 1 are considered infinite.

 o METHOD_HIERARCHY_DELIMITER
 public static final char METHOD_HIERARCHY_DELIMITER
 o VERSION_DELIMITER
 public static final char VERSION_DELIMITER
 o MINOR_VERSION_DELIMITER
 public static final char MINOR_VERSION_DELIMITER
 o usingProtocolsTag
 public static final String usingProtocolsTag
 o understandProtocolsTag
 public static final String understandProtocolsTag
 o usingPackagesTag
 public static final String usingPackagesTag
 o understandPackagesTag
 public static final String understandPackagesTag
 o contextTag
 public static final String contextTag
 o nameTag
 public static final String nameTag
 o identificationTag
 public static final String identificationTag
 o locationTag
 public static final String locationTag
 o addressesTag
 public static final String addressesTag
 o nameObjectTag
 public static final String nameObjectTag
 o descriptionTag
 public static final String descriptionTag
 o implementationTag
 public static final String implementationTag
 o nicknameTag
 public static final String nicknameTag
 o contentTag
 public static final String contentTag
 o actionTag
 public static final String actionTag
 o urlDescriptionTag
 public static final String urlDescriptionTag
 o humanInformationTag
 public static final String humanInformationTag
 o setPrefix
 public static final String setPrefix
 o assignPrefix
 public static final String assignPrefix
 o augmentPrefix
 public static final String augmentPrefix
 o diminishPrefix
 public static final String diminishPrefix
 o understandProtocols
 public Value understandProtocols
For greeting... a list of protocols this message center understands.

Constructors

 o PSYCMessageCenter
 public PSYCMessageCenter()
This creates a new instance of a message center for the PSYC protocol. This instance does not listen at the network and therefor it cannot be reached from the outside except it establishes connections itself (for example by sending messages to some remote object - then it can be reached by this object).

 o PSYCMessageCenter
 public PSYCMessageCenter(PSYCPacketManager manager)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager. If the manager is null, it will be ignored. This instance does not listen at the network and therefor it cannot be reached from the outside except it establishes connections itself (for example by sending messages to some remote object - then it can be reached by this object).

 o PSYCMessageCenter
 public PSYCMessageCenter(PSYCPacketManager manager,
                          boolean listen)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager. If the manager is null, it will be ignored. The flag listen specifies, if the message center is listening at the network for incoming messages. If it should listen, it tries listenig at the PSYC well known port, if this is not possible, it will listen at random ports.

 o PSYCMessageCenter
 public PSYCMessageCenter(PSYCPacketManager manager,
                          UNA listenLocations[])
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager. If the manager is null, it will be ignored. The array listenLocations specifies a set of locations, the center should listen on. If it cannot listen at some of the locations, they'll be ignored.

 o PSYCMessageCenter
 public PSYCMessageCenter(PSYCPacketManager manager,
                          MMPCenter center)
This creates a new instance of a message center for the PSYC protocol that sends every information it gets to the specified packet manager and the specified underlying transport manager. If the manager is null, it will be ignored. If the transport manager is null, a default one will be created.

Methods

 o setDefaults
 public static void setDefaults()
Sets the default values for UNA/UNL/UNI. This is called by the PSYCMessageCenter constructors normally. It does also call the setDefaults of the MMPMessageCenter. If it is called manually, this must be done before some UNA/UNL/UNI is instantiated.

 o setMMPCenter
 public void setMMPCenter(MMPCenter mmpCenter)
Sets the underlying MMPCenter which is called by this PSYCMessageCenter.

 o getMMPCenter
 public MMPCenter getMMPCenter()
Returns the underlying MMPCenter which is called by this PSYCMessageCenter.

 o setManager
 public PSYCPacketManager setManager(PSYCPacketManager manager)
Sets the PSYCPacketManager which is called by this PSYCMessageCenter if it delivers some PSYC event.

See Also:
addPackage
 o close
 public synchronized void close()
Closes this message center.

 o setGreeting
 public void setGreeting(String method,
                         String body)
For greeting ... the method and the body which is sent to new connected remote objects. This is not required by the PSYC protocol, so it can be defined as liked.

 o addPackage
 public boolean addPackage(PSYCPackage pack)
Adds a package to this message center.

See Also:
setManager
 o getAddress
 public UNA getAddress(UNL object)
Returns the actual address for a given object.

 o getObject
 public UNL getObject(UNA address)
Returns the object for a given address.

 o addVariableAlias
 public void addVariableAlias(String alias,
                              String longVar)
Adds a variable alias to the message centers variable expand buffer.

 o removeVariableAlias
 public String removeVariableAlias(String alias)
Removes a variable alias from the message centers variable expand buffer.

 o addMethodAlias
 public void addMethodAlias(String alias,
                            String longName)
Adds a method alias to the message centers method expand buffer.

 o removeMethodAlias
 public String removeMethodAlias(String alias)
Removes a method alias from the message centers method expand buffer.

 o getVars
 public String[] getVars(UNL remote)
Returns a list of the names of all variables currently set by the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o getValue
 public Value getValue(UNL remote,
                       String name)
Returns the Value currently set for the specified variable by the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o removeVariable
 public Value removeVariable(UNL remote,
                             String name)
Removes the specified variable currently set by the specified remote object. Returns the removed value. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o getUsingProtocols
 public String[] getUsingProtocols(UNL remote)
Returns a list of protocols currently used by the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o usesProtocol
 public boolean usesProtocol(UNL remote,
                             String name)
Checks, if the specified remote object uses the specified protocol.

 o getUnderstandProtocols
 public String[] getUnderstandProtocols(UNL remote)
Returns a list of protocols the specified remote object understands.

 o understandsProtocol
 public boolean understandsProtocol(UNL remote,
                                    String name)
Checks, if the specified remote object understands the specified protocol. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o assignUnderstandProtocol
 public void assignUnderstandProtocol(UNL remote,
                                      String protocol)
 o augmentUnderstandProtocol
 public void augmentUnderstandProtocol(UNL remote,
                                       String protocol)
 o diminishUnderstandProtocol
 public void diminishUnderstandProtocol(UNL remote,
                                        String protocol)
 o getUsingPackages
 public String[] getUsingPackages(UNL remote)
Returns a list of packages currently used by the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o usesPackage
 public boolean usesPackage(UNL remote,
                            String name)
Checks, if the specified remote object uses the specified package. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o getUnderstandPackages
 public String[] getUnderstandPackages(UNL remote)
Returns a list of packages the specified remote object understands. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o understandsPackage
 public boolean understandsPackage(UNL remote,
                                   String name)
Checks, if the specified remote object understands the specified package. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o getName
 public String getName(UNL remote)
Returns the full name of the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setName
 public void setName(UNL remote,
                     String name)
 o getIdentification
 public UNI getIdentification(UNL remote)
Returns the Uniform Network Identification of the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setIdentification
 public void setIdentification(UNL remote,
                               UNI identification)
 o getLocations
 public UNL[] getLocations(UNL remote)
Returns a list of all Uniform Network Locations of the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o assignLocation
 public void assignLocation(UNL remote,
                            UNL location)
 o augmentLocation
 public void augmentLocation(UNL remote,
                             UNL location)
 o diminishLocation
 public void diminishLocation(UNL remote,
                              UNL location)
 o getObjectName
 public UNL getObjectName(UNL remote)
 o getDescription
 public Object getDescription(UNL remote)
Returns a Virtual Environment Description Language (VEDL) object description of the specified remote object. VEDL object descriptions are not supported yet. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setDescription
 public void setDescription(UNL remote,
                            Object description)
 o getImplementation
 public String[] getImplementation(UNL remote)
Returns a list of platforms the specified remote object is implemented on. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o getNickname
 public String getNickname(UNL remote)
Returns the Nickname of the specified remote object (Conferencing specific stuff). If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setNickname
 public void setNickname(UNL remote,
                         String nickname)
 o getContentType
 public String getContentType(UNL remote)
Returns the actual content type, the specified remote object is using for its bodies. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setContentType
 public void setContentType(UNL remote,
                            String contentType)
 o getAction
 public String getAction(UNL remote)
Returns a currently set action of the specified remote object (Conferencing specific stuff). If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setAction
 public void setAction(UNL remote,
                       String action)
 o getURLDescription
 public URL getURLDescription(UNL remote)
Returns the URL where the specified remote object is described on (Conferencing specific stuff - for example a home page). If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setURLDescription
 public void setURLDescription(UNL remote,
                               URL description)
 o getHumanInformation
 public String getHumanInformation(UNL remote)
Returns a human readable description of the specified remote object. If remote is null, it returns the same for itself. This means the Value which is sent to every new connected remote.

 o setHumanInformation
 public void setHumanInformation(UNL remote,
                                 String information)
 o getActualMethod
 public String getActualMethod(UNL remote)
Returns the actual method the specified remote object has sent. Only defined while PSYCPackage.received() is called. If remote is null, it returns null at all.

 o getMMPPacketManager
 public MMPPacketManager getMMPPacketManager()
 o createContext
 public void createContext(String context)
Creates the specified outgoing context.

 o isContext
 public boolean isContext(String context)
Checks, if the specified String describes an existing outgoing context.

 o removeContext
 public void removeContext(String context)
Removes the specified outgoing context.

 o addToContext
 public UNL addToContext(String context,
                         UNL remote)
Adds the specified remote object to the specified outgoing context.

 o addToContext
 public void addToContext(UNL remote)
Adds the specified remote object to an implicite given context.
Note: UNLs may contain contexts.

 o removeFromContext
 public void removeFromContext(String context,
                               UNL remote)
Removes the specified remote object from the specified outgoing context.

 o removeFromContext
 public void removeFromContext(UNL remote)
Removes the specified remote object from the implicite given context.
Note: UNLs may contain contexts.

 o assignVariable
 public void assignVariable(String context,
                            String name,
                            Value value,
                            boolean immediately)
Assigns the given Value to the specified variable for the specified outgoing context.

 o augmentVariable
 public void augmentVariable(String context,
                             String name,
                             Value value,
                             boolean immediately)
Augments the given Value to the specified variable for the specified outgoing context.

 o diminishVariable
 public void diminishVariable(String context,
                              String name,
                              Value value,
                              boolean immediately)
Diminishes the given Value from the specified variable for the specified outgoing context.

 o removeVariable
 public void removeVariable(String context,
                            String name)
Removes the specified variable from the variable buffer for the specified outgoing context. It does not tell any peer about that. That means, that new peers don't get this variable any more.

 o assignVariable
 public void assignVariable(UNL remote,
                            String name,
                            Value value,
                            boolean immediately)
Assigns the specified variable for the specified remote object with the specified Value. If the remote is null, it does the same for itself. This means, it will be sent to every new connected remote object.

 o augmentVariable
 public void augmentVariable(UNL remote,
                             String name,
                             Value value,
                             boolean immediately)
Augments the specified variable for the specified remote object with the specified Value. If the remote is null, it does the same for itself. This means, it will be sent to every new connected remote object.

 o diminishVariable
 public void diminishVariable(UNL remote,
                              String name,
                              Value value,
                              boolean immediately)
Diminishes the specified variable for the specified remote object with the specified Value. If the remote is null, it does the same for itself.

 o queryVariable
 public void queryVariable(UNL remote,
                           String name) throws PSYCDeliveryException
Queries the specified variable for the specified remote object. If the remote is null, it does the same for itself. This means, it will be sent to every new connected remote object.

 o send
 public void send(UNL remote,
                  String method,
                  String body,
                  Hashtable tempVars) throws PSYCDeliveryException
Sends the specified message (method and body) to the specified remote object and sets temporarily for this message the specified variables. tempVars contains a Map of String variableName to Value variableValue.

 o send
 public void send(String context,
                  String method,
                  String body,
                  Hashtable tempVars)
Sends the specified message (method and body) to the specified context and sets temporarily for this message the specified variables. tempVars contains a Map of String variableName to Value variableValue.
It ignores errors if they occure in sending to single context members.

 o send
 public void send(UNL remote,
                  String method,
                  String body) throws PSYCDeliveryException
Sends the specified message (method and body) to the specified remote object.

 o send
 public void send(String context,
                  String method,
                  String body)
Sends the specified message (method and body) to the specified context.
It ignores errors if they occure in sending to single context members.

 o sendChecked
 public void sendChecked(UNL remote,
                         String packageName,
                         String method,
                         String body,
                         Hashtable tempVars) throws PSYCDeliveryException
Sends the specified message (method, body and temporarily set variables) to the specified remote object but only, if the object supports the specified package.

 o sendChecked
 public void sendChecked(UNL remote,
                         String packageName,
                         String method,
                         String body) throws PSYCDeliveryException
Sends the specified message (method and body) to the specified remote object but only, if the object supports the specified package.


All Packages  Class Hierarchy  This Package  Previous  Next  Index