FileDocCategorySizeDatePackage
SystemServiceRequestor.javaAPI DocphoneME MR2 API (J2ME)2769Wed May 02 18:00:10 BST 2007com.sun.midp.services

SystemServiceRequestor

public abstract class SystemServiceRequestor extends Object
Used by client to obtain connection to service.

Fields Summary
private static SystemServiceRequestor
instance
Constructors Summary
Methods Summary
public static synchronized com.sun.midp.services.SystemServiceRequestorgetInstance(com.sun.midp.security.SecurityToken token)
Gets class instance.

return
SystemServiceRequestor class instance


                      
        

                
        
              

        token.checkIfPermissionAllowed(Permissions.MIDP);

        if (instance == null) {
            if (!MIDletSuiteUtils.isAmsIsolate()) {
                Link receiveLink = NamedLinkPortal.getLink(
                    SystemServiceRequestHandler.SERVICE_TO_CLIENT_LINK_NAME);
                Link sendLink = NamedLinkPortal.getLink(
                    SystemServiceRequestHandler.CLIENT_TO_SERVICE_LINK_NAME);
                SystemServiceConnectionLinks requestLinks = null;
                requestLinks = new SystemServiceConnectionLinks(
                        sendLink, receiveLink);

                instance = new SystemServiceRequestorRemote(requestLinks);
            } else {
                SystemServiceManager manager = null;
                manager = SystemServiceManager.getInstance(token);
                instance = new SystemServiceRequestorLocal(manager);
            }
        }

        return instance;
    
public abstract SystemServiceConnectionrequestService(java.lang.String serviceID)
Establishes connection to service

param
serviceID unique service ID
return
connection to service