ilog.server.jcomp
Class MvComponentFactory

java.lang.Object
  |
  +--ilog.server.jcomp.MvComponentFactory
Direct Known Subclasses:
IlsDSComponentFactory

public class MvComponentFactory
extends java.lang.Object

Category: Dynamic view-related class

This class is the factory class used to create instances of the MvComponent class. Any component of a dynamic view server is implemented by an instance of the MvComponent type or of one of its subtypes. Such an instance is automatically created on the component side each time this process connects to a dynamic view server. By subclassing MvComponentFactory and overriding the newInstance function, you can create your own subtype of MvComponent.

See Also:
MvComponent, MvComponent.Connect(java.lang.String, java.lang.String)

Constructor Summary
MvComponentFactory()
          The construction of an IlsMvComponentFactory object is triggered either by the function GetSingleton or by the construction of a subtype object.
 
Method Summary
 java.net.InetAddress getHostName()
          This method is used by Rogue Wave Server when a component connects to a server.
 java.lang.String getInetId()
          This method is used by Rogue Wave Server when a component connects to a server.
 int getProcessId()
          This method is used by Rogue Wave Server when a component connects to a server.
static MvComponentFactory GetSingleton()
          This method returns the component factory.
static MvComponentFactory GetSingletonHandle()
          This method returns a handle to the class singleton.
 int getUserId()
          This method is used by Rogue Wave Server when a component connects to a server.
 MvValue[] getUserInfo()
          This method is called by the component to send user info to the server.
 java.lang.String getUserName()
          This method is used by Rogue Wave Server when a component connects to a server.
static MvComponent Instanciate()
          This method is called by Rogue Wave Server to create a new instance of the class MvComponent.
 MvComponent newInstance()
          This method is called by the Instanciate function on the class singleton to create a new instance of an IlsMvComponent class or of a derived class.
static MvComponentFactory SetSingleton(MvComponentFactory f)
          Declares the component factory singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MvComponentFactory

public MvComponentFactory()
The construction of an IlsMvComponentFactory object is triggered either by the function GetSingleton or by the construction of a subtype object.
Method Detail

newInstance

public MvComponent newInstance()
This method is called by the Instanciate function on the class singleton to create a new instance of an IlsMvComponent class or of a derived class. It must be overridden if you want Rogue Wave Server to create instances of a specific derived class.
Returns:
The new instance.
See Also:
GetSingleton(), Instanciate()

getUserName

public java.lang.String getUserName()
This method is used by Rogue Wave Server when a component connects to a server. By default, and if possible, this function tries to find the name of the user who started the component by searching the property "user.name".
Returns:
The user name or null.
See Also:
Properties

getUserId

public int getUserId()
This method is used by Rogue Wave Server when a component connects to a server.
Returns:
1

getHostName

public java.net.InetAddress getHostName()
This method is used by Rogue Wave Server when a component connects to a server.
Returns:
The name of the local host .

getInetId

public java.lang.String getInetId()
This method is used by Rogue Wave Server when a component connects to a server.
Returns:
The local host IP address

getProcessId

public int getProcessId()
This method is used by Rogue Wave Server when a component connects to a server.
Returns:
1

getUserInfo

public MvValue[] getUserInfo()
This method is called by the component to send user info to the server. Default implementation returns null.
Returns:
an array of MvValue used as User Info.

Instanciate

public static MvComponent Instanciate()
This method is called by Rogue Wave Server to create a new instance of the class MvComponent. It calls the newInstance function on the class singleton.
Returns:
The new instance.
See Also:
GetSingleton()

GetSingleton

public static MvComponentFactory GetSingleton()
This method returns the component factory. If no factory has been declared yet, an instance of the class MvComponentFactory is automatically created, declared as the class singleton using the SetSingleton member function and returned as the function result.
Returns:
The declared singleton.
See Also:
SetSingleton(ilog.server.jcomp.MvComponentFactory)

GetSingletonHandle

public static MvComponentFactory GetSingletonHandle()
This method returns a handle to the class singleton. If no singleton has been declared yet, it returns null.
Returns:
The singleton.

SetSingleton

public static MvComponentFactory SetSingleton(MvComponentFactory f)
Declares the component factory singleton.
Parameters:
f - The new factory, can be null.
Returns:
The previous factory handle.