public class NetworkEnvironmentSettings
extends java.lang.Object
NetworkEnvironment| Constructor and Description |
|---|
NetworkEnvironmentSettings(java.io.InputStream savedInstace)
Creates a new
NetworkEnvironmentSettings instance using the saved information in the InputStream. |
NetworkEnvironmentSettings(java.lang.String deviceName,
DeviceType deviceType,
EncryptionType encryptionType,
int dataPort,
int braocastPort,
byte[] encryptionKey)
Creates a new
NetworkEnvironmentSettings instance guessing the operating system (will use 'Linux' for Android). |
NetworkEnvironmentSettings(java.lang.String deviceName,
DeviceType deviceType,
EncryptionType encryptionType,
int dataPort,
int braocastPort,
byte[] encryptionKey,
java.lang.String osName)
Creates a new
NetworkEnvironmentSettings instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getBroadcastPort()
Returns the port o which broadcasts are send.
|
int |
getDataPort()
Returns the port on which data is transmitted.
|
java.lang.String |
getDeviceName()
Returns the device name.
|
DeviceType |
getDeviceType()
Returns the
DeviceType. |
byte[] |
getEncryptionKey()
Returns the encryption key used.
|
EncryptionType |
getEncryptionType()
Returns the
EncryptionType used. |
java.lang.String |
getLocalId()
Returns the local id.
|
java.lang.String |
getOsName()
Returns the operating system's name.
|
void |
save(java.io.OutputStream out)
Saves this
NetworkEnvironmentSettings instance to the OutputStream. |
public NetworkEnvironmentSettings(java.io.InputStream savedInstace)
throws java.lang.Exception
NetworkEnvironmentSettings instance using the saved information in the InputStream.
The InputStream is not closed. Please close the give InputStream after invoking this constructor.savedInstace - a InputStream containing a saved instance, e.g. a FileInputStream to a save filejava.lang.Exception#save(OutputStream)}public NetworkEnvironmentSettings(java.lang.String deviceName,
DeviceType deviceType,
EncryptionType encryptionType,
int dataPort,
int braocastPort,
byte[] encryptionKey)
NetworkEnvironmentSettings instance guessing the operating system (will use 'Linux' for Android).groupName - the name of the groupdeviceName - the name of the devicedeviceType - the name of the typeencryptionType - the type of the encryptiondataPort - the port on which data is transmittedbraocastPort - the port for broadcast messagesencryptionKey - the encryption key usedpublic NetworkEnvironmentSettings(java.lang.String deviceName,
DeviceType deviceType,
EncryptionType encryptionType,
int dataPort,
int braocastPort,
byte[] encryptionKey,
java.lang.String osName)
NetworkEnvironmentSettings instance.groupName - the name of the groupdeviceName - the name of the devicedeviceType - the name of the typeencryptionType - the type of the encryptiondataPort - the port on which data is transmittedbraocastPort - the port for broadcast messagesencryptionKey - the encryption key usedosName - the name of the operating systempublic void save(java.io.OutputStream out)
throws java.lang.Exception
NetworkEnvironmentSettings instance to the OutputStream.
The given OutputStream is never closed, please close the OutputStream after invoking this method if necessary.out - a OutputStream to a resource which saves the data, e.g. a FileOutputStream to a save file.java.lang.Exception#NetworkEnvironmentSettings(InputStream)}public int getDataPort()
public int getBroadcastPort()
public java.lang.String getDeviceName()
public DeviceType getDeviceType()
DeviceType.DeviceTypepublic java.lang.String getOsName()
public java.lang.String getLocalId()
public EncryptionType getEncryptionType()
EncryptionType used.EncryptionType usedpublic byte[] getEncryptionKey()