Package jadex.platform.service.context
Class ContextService
- java.lang.Object
- 
- jadex.bridge.service.BasicService
- 
- jadex.platform.service.context.ContextService
 
 
- 
- All Implemented Interfaces:
- IInternalService,- IService,- IContextService
 
 public class ContextService extends BasicService implements IContextService Java SE Implementation ofIContextService
- 
- 
Field Summary- 
Fields inherited from class jadex.bridge.service.BasicServiceidcnt, impltype, internalaccess, providerid, shutdowned, sid, started, type
 - 
Fields inherited from interface jadex.bridge.service.IServiceEMPTY_SERVICES
 
- 
 - 
Constructor SummaryConstructors Constructor Description ContextService(IComponentIdentifier provider)Create a new ContextService.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Boolean>dispatchEvent(IJadexAndroidEvent event)Dispatches an Event to the Android UI / Activity.IFuture<java.io.File>getFile(java.lang.String name)Returns a FileIFuture<java.util.List<java.net.InetAddress>>getNetworkIps()Get the network ips.IFuture<IPreferences>getSharedPreferences(java.lang.String preferenceFileName)Gets a Shared Preference Container.IFuture<java.lang.Void>openFile(java.lang.String path)Opens a File with the default application.IFuture<java.lang.Void>shutdownService()Shutdown the service.- 
Methods inherited from class jadex.bridge.service.BasicServicecreateServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getInvokeMethod, getMethodInfos, getMethodTimeout, getPropertyMap, getProviderId, getServiceId, hashCode, initNFProperties, invokeMethod, isValid, setComponentAccess, setPropertyMap, setServiceIdentifier, startService, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
ContextServicepublic ContextService(IComponentIdentifier provider) Create a new ContextService.
 
- 
 - 
Method Detail- 
getFilepublic IFuture<java.io.File> getFile(java.lang.String name) Returns a File- Specified by:
- getFilein interface- IContextService
- Parameters:
- name- File name
- Returns:
- File
 
 - 
getSharedPreferencespublic IFuture<IPreferences> getSharedPreferences(java.lang.String preferenceFileName) Gets a Shared Preference Container. Returns null on Desktop Systems.- Specified by:
- getSharedPreferencesin interface- IContextService
- Parameters:
- preferenceFileName-
 
 - 
dispatchEventpublic IFuture<java.lang.Boolean> dispatchEvent(IJadexAndroidEvent event) Dispatches an Event to the Android UI / Activity. Does nothing on Desktop Systems.- Specified by:
- dispatchEventin interface- IContextService
- Parameters:
- event-- IJadexAndroidEvent
- Returns:
- true, if at least one receiver was registered for this event and delivery was successful, else false.
 
 - 
getNetworkIpspublic IFuture<java.util.List<java.net.InetAddress>> getNetworkIps() Get the network ips.- Specified by:
- getNetworkIpsin interface- IContextService
 
 - 
openFilepublic IFuture<java.lang.Void> openFile(java.lang.String path) throws java.io.IOException Opens a File with the default application.- Specified by:
- openFilein interface- IContextService
- Parameters:
- path-
- Throws:
- java.io.IOException
 
 - 
shutdownServicepublic IFuture<java.lang.Void> shutdownService() Description copied from class:BasicServiceShutdown the service.- Specified by:
- shutdownServicein interface- IInternalService
- Overrides:
- shutdownServicein class- BasicService
- Returns:
- A future that is done when the service has completed its shutdown.
 
 
- 
 
-