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
-
actionTag
-
-
addressesTag
-
-
assignPrefix
-
-
augmentPrefix
-
-
contentTag
-
-
contextTag
-
-
defaultPort
-
-
defaultProtocol
-
-
defaultResource
-
-
defaultScheme
-
-
descriptionTag
-
-
diminishPrefix
-
-
humanInformationTag
-
-
identificationTag
-
-
implementationTag
-
-
locationTag
-
-
maxVariables
- The maximum number of permanent variables per object/context.
-
METHOD_HIERARCHY_DELIMITER
-
-
MINOR_VERSION_DELIMITER
-
-
nameObjectTag
-
-
nameTag
-
-
nicknameTag
-
-
ProtocolMajorVersion
-
-
ProtocolMinorVersion
-
-
ProtocolName
-
-
setPrefix
-
-
understandPackagesTag
-
-
understandProtocols
- For greeting...
-
understandProtocolsTag
-
-
urlDescriptionTag
-
-
usingPackagesTag
-
-
usingProtocolsTag
-
-
VERSION_DELIMITER
-
-
PSYCMessageCenter()
- This creates a new instance of a message center for the PSYC
protocol.
-
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.
-
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.
-
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.
-
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.
-
addMethodAlias(String, String)
- Adds a method alias to the message centers method expand buffer.
-
addPackage(PSYCPackage)
- Adds a package to this message center.
-
addToContext(String, UNL)
- Adds the specified remote object to the specified outgoing context.
-
addToContext(UNL)
- Adds the specified remote object to an implicite given context.
Note: UNLs may contain contexts.
-
addVariableAlias(String, String)
- Adds a variable alias to the message centers variable expand buffer.
-
assignLocation(UNL, UNL)
-
-
assignUnderstandProtocol(UNL, String)
-
-
assignVariable(String, String, Value, boolean)
- Assigns the given Value to the specified variable for the
specified outgoing context.
-
assignVariable(UNL, String, Value, boolean)
- Assigns the specified variable for the specified remote object with
the specified Value.
-
augmentLocation(UNL, UNL)
-
-
augmentUnderstandProtocol(UNL, String)
-
-
augmentVariable(String, String, Value, boolean)
- Augments the given Value to the specified variable for the
specified outgoing context.
-
augmentVariable(UNL, String, Value, boolean)
- Augments the specified variable for the specified remote object with
the specified Value.
-
close()
- Closes this message center.
-
createContext(String)
- Creates the specified outgoing context.
-
diminishLocation(UNL, UNL)
-
-
diminishUnderstandProtocol(UNL, String)
-
-
diminishVariable(String, String, Value, boolean)
- Diminishes the given Value from the specified variable for the
specified outgoing context.
-
diminishVariable(UNL, String, Value, boolean)
- Diminishes the specified variable for the specified remote object with
the specified Value.
-
getAction(UNL)
- Returns a currently set action of the specified remote object
(Conferencing specific stuff).
-
getActualMethod(UNL)
- Returns the actual method the specified remote object has sent.
-
getAddress(UNL)
- Returns the actual address for a given object.
-
getContentType(UNL)
- Returns the actual content type, the specified remote object
is using for its bodies.
-
getDescription(UNL)
- Returns a Virtual Environment Description Language (VEDL)
object description of the specified remote object.
-
getHumanInformation(UNL)
- Returns a human readable description of the specified remote object.
-
getIdentification(UNL)
- Returns the Uniform Network Identification
of the specified remote object.
-
getImplementation(UNL)
- Returns a list of platforms the specified remote object is
implemented on.
-
getLocations(UNL)
- Returns a list of all Uniform Network Locations
of the specified remote object.
-
getMMPCenter()
- Returns the underlying MMPCenter which is called by this
PSYCMessageCenter.
-
getMMPPacketManager()
-
-
getName(UNL)
- Returns the full name of the specified remote object.
-
getNickname(UNL)
- Returns the Nickname of the specified remote object
(Conferencing specific stuff).
-
getObject(UNA)
- Returns the object for a given address.
-
getObjectName(UNL)
-
-
getUnderstandPackages(UNL)
- Returns a list of packages the specified remote object understands.
-
getUnderstandProtocols(UNL)
- Returns a list of protocols the specified remote object understands.
-
getURLDescription(UNL)
- Returns the URL where the specified remote object is described on
(Conferencing specific stuff - for example a home page).
-
getUsingPackages(UNL)
- Returns a list of packages currently used by the specified remote
object.
-
getUsingProtocols(UNL)
- Returns a list of protocols currently used by the specified remote
object.
-
getValue(UNL, String)
- Returns the Value currently set for the specified variable
by the specified remote object.
-
getVars(UNL)
- Returns a list of the names of all variables currently set
by the specified remote object.
-
isContext(String)
- Checks, if the specified String describes an existing
outgoing context.
-
queryVariable(UNL, String)
- Queries the specified variable for the specified remote object.
-
removeContext(String)
- Removes the specified outgoing context.
-
removeFromContext(String, UNL)
- Removes the specified remote object from the specified outgoing context.
-
removeFromContext(UNL)
- Removes the specified remote object from the implicite given context.
Note: UNLs may contain contexts.
-
removeMethodAlias(String)
- Removes a method alias from the message centers method expand buffer.
-
removeVariable(String, String)
- Removes the specified variable from the variable buffer for
the specified outgoing context.
-
removeVariable(UNL, String)
- Removes the specified variable currently set by the specified remote
object.
-
removeVariableAlias(String)
- Removes a variable alias from the message centers variable expand buffer.
-
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.
-
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.
-
send(UNL, String, String)
- Sends the specified message (method and body) to the specified
remote object.
-
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.
-
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.
-
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.
-
setAction(UNL, String)
-
-
setContentType(UNL, String)
-
-
setDefaults()
- Sets the default values for UNA/UNL/UNI.
-
setDescription(UNL, Object)
-
-
setGreeting(String, String)
- For greeting ...
-
setHumanInformation(UNL, String)
-
-
setIdentification(UNL, UNI)
-
-
setManager(PSYCPacketManager)
- Sets the PSYCPacketManager which is called by this
PSYCMessageCenter if it delivers some PSYC event.
-
setMMPCenter(MMPCenter)
- Sets the underlying MMPCenter which is called by this
PSYCMessageCenter.
-
setName(UNL, String)
-
-
setNickname(UNL, String)
-
-
setURLDescription(UNL, URL)
-
-
understandsPackage(UNL, String)
- Checks, if the specified remote object understands the specified
package.
-
understandsProtocol(UNL, String)
- Checks, if the specified remote object understands the specified
protocol.
-
usesPackage(UNL, String)
- Checks, if the specified remote object uses the specified
package.
-
usesProtocol(UNL, String)
- Checks, if the specified remote object uses the specified protocol.
ProtocolName
public static final String ProtocolName
ProtocolMajorVersion
public static final int ProtocolMajorVersion
ProtocolMinorVersion
public static final int ProtocolMinorVersion
defaultScheme
public static final String defaultScheme
defaultPort
public static final int defaultPort
defaultProtocol
public static final String defaultProtocol
defaultResource
public static final String defaultResource
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.
METHOD_HIERARCHY_DELIMITER
public static final char METHOD_HIERARCHY_DELIMITER
VERSION_DELIMITER
public static final char VERSION_DELIMITER
MINOR_VERSION_DELIMITER
public static final char MINOR_VERSION_DELIMITER
usingProtocolsTag
public static final String usingProtocolsTag
understandProtocolsTag
public static final String understandProtocolsTag
usingPackagesTag
public static final String usingPackagesTag
understandPackagesTag
public static final String understandPackagesTag
contextTag
public static final String contextTag
nameTag
public static final String nameTag
identificationTag
public static final String identificationTag
locationTag
public static final String locationTag
addressesTag
public static final String addressesTag
nameObjectTag
public static final String nameObjectTag
descriptionTag
public static final String descriptionTag
implementationTag
public static final String implementationTag
nicknameTag
public static final String nicknameTag
contentTag
public static final String contentTag
actionTag
public static final String actionTag
urlDescriptionTag
public static final String urlDescriptionTag
humanInformationTag
public static final String humanInformationTag
setPrefix
public static final String setPrefix
assignPrefix
public static final String assignPrefix
augmentPrefix
public static final String augmentPrefix
diminishPrefix
public static final String diminishPrefix
understandProtocols
public Value understandProtocols
- For greeting... a list of protocols this message center understands.
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).
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).
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.
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.
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.
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.
setMMPCenter
public void setMMPCenter(MMPCenter mmpCenter)
- Sets the underlying MMPCenter which is called by this
PSYCMessageCenter.
getMMPCenter
public MMPCenter getMMPCenter()
- Returns the underlying MMPCenter which is called by this
PSYCMessageCenter.
setManager
public PSYCPacketManager setManager(PSYCPacketManager manager)
- Sets the PSYCPacketManager which is called by this
PSYCMessageCenter if it delivers some PSYC event.
- See Also:
- addPackage
close
public synchronized void close()
- Closes this message center.
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.
addPackage
public boolean addPackage(PSYCPackage pack)
- Adds a package to this message center.
- See Also:
- setManager
getAddress
public UNA getAddress(UNL object)
- Returns the actual address for a given object.
getObject
public UNL getObject(UNA address)
- Returns the object for a given address.
addVariableAlias
public void addVariableAlias(String alias,
String longVar)
- Adds a variable alias to the message centers variable expand buffer.
removeVariableAlias
public String removeVariableAlias(String alias)
- Removes a variable alias from the message centers variable expand buffer.
addMethodAlias
public void addMethodAlias(String alias,
String longName)
- Adds a method alias to the message centers method expand buffer.
removeMethodAlias
public String removeMethodAlias(String alias)
- Removes a method alias from the message centers method expand buffer.
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.
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.
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.
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.
usesProtocol
public boolean usesProtocol(UNL remote,
String name)
- Checks, if the specified remote object uses the specified protocol.
getUnderstandProtocols
public String[] getUnderstandProtocols(UNL remote)
- Returns a list of protocols the specified remote object understands.
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.
assignUnderstandProtocol
public void assignUnderstandProtocol(UNL remote,
String protocol)
augmentUnderstandProtocol
public void augmentUnderstandProtocol(UNL remote,
String protocol)
diminishUnderstandProtocol
public void diminishUnderstandProtocol(UNL remote,
String protocol)
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.
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.
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.
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.
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.
setName
public void setName(UNL remote,
String name)
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.
setIdentification
public void setIdentification(UNL remote,
UNI identification)
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.
assignLocation
public void assignLocation(UNL remote,
UNL location)
augmentLocation
public void augmentLocation(UNL remote,
UNL location)
diminishLocation
public void diminishLocation(UNL remote,
UNL location)
getObjectName
public UNL getObjectName(UNL remote)
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.
setDescription
public void setDescription(UNL remote,
Object description)
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.
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.
setNickname
public void setNickname(UNL remote,
String nickname)
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.
setContentType
public void setContentType(UNL remote,
String contentType)
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.
setAction
public void setAction(UNL remote,
String action)
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.
setURLDescription
public void setURLDescription(UNL remote,
URL description)
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.
setHumanInformation
public void setHumanInformation(UNL remote,
String information)
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.
getMMPPacketManager
public MMPPacketManager getMMPPacketManager()
createContext
public void createContext(String context)
- Creates the specified outgoing context.
isContext
public boolean isContext(String context)
- Checks, if the specified String describes an existing
outgoing context.
removeContext
public void removeContext(String context)
- Removes the specified outgoing context.
addToContext
public UNL addToContext(String context,
UNL remote)
- Adds the specified remote object to the specified outgoing context.
addToContext
public void addToContext(UNL remote)
- Adds the specified remote object to an implicite given context.
Note: UNLs may contain contexts.
removeFromContext
public void removeFromContext(String context,
UNL remote)
- Removes the specified remote object from the specified outgoing context.
removeFromContext
public void removeFromContext(UNL remote)
- Removes the specified remote object from the implicite given context.
Note: UNLs may contain contexts.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
send
public void send(UNL remote,
String method,
String body) throws PSYCDeliveryException
- Sends the specified message (method and body) to the specified
remote object.
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.
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.
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