public class StandardClientProfile extends Object implements ClientProfile
| Modifier and Type | Field and Description | 
|---|---|
| static String | LOCKFILE_NAMEFilename used for lockfile in home directory by default (".samp"). | 
| static String | STDPROFILE_HUB_PREFIXPrefix in SAMP_HUB value indicating lockfile URL ("std-lockurl:"). | 
| Constructor and Description | 
|---|
| StandardClientProfile(SampXmlRpcClientFactory xClientFactory,
                     SampXmlRpcServerFactory xServerFactory)Constructs a profile given client and server factory implementations. | 
| StandardClientProfile(XmlRpcKit xmlrpc)Constructs a profile given an XmlRpcKit object. | 
| Modifier and Type | Method and Description | 
|---|---|
| static URL | getDefaultLockUrl()Returns the lockfile URL which will be used in absence of any
 SAMP_HUB environment variable. | 
| static StandardClientProfile | getInstance()Returns an instance based on the default XML-RPC implementation. | 
| LockInfo | getLockInfo()Returns the LockInfo which indicates how to locate the hub. | 
| static URL | getLockUrl()Returns the location of the Standard Profile lockfile. | 
| boolean | isHubRunning()Indicates whether a hub contactable by this profile appears to be
 running. | 
| HubConnection | register()Attempts to register with a SAMP hub and return a corresponding
 connection object. | 
public static final String LOCKFILE_NAME
public static final String STDPROFILE_HUB_PREFIX
public StandardClientProfile(SampXmlRpcClientFactory xClientFactory, SampXmlRpcServerFactory xServerFactory)
xClientFactory - XML-RPC client factory implementationxServerFactory - XML-RPC server factory implementationpublic StandardClientProfile(XmlRpcKit xmlrpc)
xmlrpc - XML-RPC implementationpublic boolean isHubRunning()
ClientProfileisHubRunning in interface ClientProfilepublic HubConnection register() throws SampException
ClientProfileregister in interface ClientProfileSampException - in case of some unexpected errorpublic LockInfo getLockInfo() throws IOException
LockInfo.readLockFile(getLockUrl());
 it may be overridden to provide a non-standard client profiles.IOException - if the lockfile exists but cannot be read for
          some reasonpublic static URL getLockUrl() throws IOException
.samp in the user's "home"
 directory, unless overridden by a value of the SAMP_HUB environment
 variable starting with "std-lockurl".IOExceptionpublic static URL getDefaultLockUrl() throws IOException
IOExceptionpublic static StandardClientProfile getInstance()
XmlRpcKit.getInstance(), 
DefaultClientProfile.getProfile()Copyright © 2008–2024. All rights reserved.