Package com.portal.bas
Interface PInfranetAppController
- All Known Implementing Classes:
PInfranetAppControllerImpl
,PInfranetConnectionImpl
public interface PInfranetAppController
PInfranetAppController
, one of the main server-side classes,
contains application information and services of interest only to other
server-side classes. One instance of PInfranetAppController
is
created for each client session, and it ties together all
controllers that are created for that session.
The class contains the client session's locale, application name, and other
optional data. It is used to establish connections between
controllers on the server side, using handles passed through the client.
This is how server-side event listeners work, for example,
PRemoteListenerProxy
.
When a connection to Portal is created, this class is used to cache the connection.
All controllers can call getAppController()
to get their
instance of PInfranetAppController
.
- Version:
- %version: 3.1.2 % %date_modified: Tue Jan 08 20:30:33 2002 %
- Author:
- larrylf
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDuplicates the application controller.Gets the application name.Gets the application/client locale.Returns the current connection context.getEventListener
(Object handle) Gets an event listener, given a handle generated bypostEventListener
.Gets any other data sent by the client application.Gets aPPermission
object.boolean
Looks up a controller for a given component.postEventListener
(Object src, EventListener l) Posts an event listener and returns a handle for it.void
registerController
(PControllerBean comp, PControllerImpl impl) Registers the client portion of a component's controller with the server.void
Releases the connection retrieved bygetConnection()
.void
removeEventListener
(Object handle) Removes a posted event listener.void
setBrandContext
(Poid brandPoid) void
setConnection
(PCachedContext conn) Sets a connection object for application use.void
Unregisters the client portion of a component's controller with the server.void
Unregisters the client portion of all component's controller with the server.void
verifyAndSwitchToUser
(String user, String password, String service)
-
Method Details
-
duplicate
Duplicates the application controller. It is not the same as cloning, because the new and original application controllers share most features. It makes a shallow copy of the application controller that contains unique contexts.- Returns:
- A duplicate application controller.
- Throws:
RemoteException
- thrown in case of failure
-
duplicate
- Throws:
RemoteException
-
lookupController
Looks up a controller for a given component.- Parameters:
comp
- a remote component stub- Returns:
- The controller, if any, associated with the component.
- Throws:
RemoteException
- thrown in case of failure
-
postEventListener
Posts an event listener and returns a handle for it. This is used for passing events, where the events are passed on the server side but listeners are registered on the client side.- Parameters:
src
- the source of the eventl
- an event listener- Returns:
- A handle to pass to the client.
- Throws:
RemoteException
- thrown in case of failure
-
getEventListener
Gets an event listener, given a handle generated bypostEventListener
.- Parameters:
handle
- a token generated bypostEventListener
- Returns:
- The posted listener for the handle.
- Throws:
RemoteException
- thrown in case of failure
-
removeEventListener
Removes a posted event listener.- Parameters:
handle
- the handle to the listener- Throws:
RemoteException
- thrown in case of failure
-
setConnection
Sets a connection object for application use.- Parameters:
conn
- a new, cached context object- Throws:
RemoteException
- thrown in case of failure
-
getConnection
Returns the current connection context. May be null if no connection to Portal has been made. For every call togetConnection()
there must be a corresponding call toreleaseConnection()
.- Returns:
- A
PCachedContext
object or null. - Throws:
RemoteException
- thrown in case of failure- See Also:
-
releaseConnection
Releases the connection retrieved bygetConnection()
. For every call togetConnection()
there must be a corresponding call toreleaseConnection()
.- Parameters:
ctx
- the connection to be released.- Throws:
RemoteException
- See Also:
-
registerController
Registers the client portion of a component's controller with the server.- Parameters:
comp
- the component to registerimpl
- the component's controller- Throws:
RemoteException
- thrown in case of failure
-
unregisterController
Unregisters the client portion of a component's controller with the server.- Parameters:
impl
- the component's controller- Throws:
RemoteException
- thrown in case of failure
-
getPermissions
Gets aPPermission
object.- Returns:
- A
PPermission
object. - Throws:
RemoteException
- thrown for remote errors
-
getAppName
Gets the application name.- Returns:
- A
String
with the application name, - Throws:
RemoteException
- thrown in case of failure
-
getClientLocale
Gets the application/client locale.- Returns:
- The client's locale.
- Throws:
RemoteException
- thrown in case of failure
-
getOtherData
Gets any other data sent by the client application.- Returns:
- An object containing application-specific data.
- Throws:
RemoteException
- thrown in case of failure
-
getServiceHandle
- Throws:
RemoteException
-
getAccountHandle
- Throws:
RemoteException
-
isBrandingEnabled
- Throws:
RemoteException
-
setBrandContext
- Throws:
RemoteException
-
verifyAndSwitchToUser
- Throws:
RemoteException
-
unregisterControllers
void unregisterControllers()Unregisters the client portion of all component's controller with the server.
-