Loading…

Kryptel/Java

IKryptelComponent interface

Declaration

package com.kryptel;

public interface IKryptelComponent extends AutoCloseable {
	long ComponentType() throws Exception;
	UUID ComponentID() throws Exception;
	String ComponentName() throws Exception;
	
	Object GetInterface(UUID iid) throws Exception;
	void DiscardComponent() throws Exception;
}

Description

This is the base component interface, which is exported by every component.

See also Components to learn more about component structure and usage.

ComponentID

UUID ComponentID() throws Exception;

Returns 128-bit component ID. Component ID is a unique UUID (GUID) value defined in Guids class.

ComponentName

String ComponentName() throws Exception;

Returns user-friendly component's name.

ComponentType

long ComponentType() throws Exception;

Returns component's type mask. The mask values are defined in Constants class.

Note that component may implement interfaces for several (not necessarily related) component types. Do not compare the component type, use bitwise OR instead.

DiscardComponent

void DiscardComponent() throws Exception;

Frees all used resources and discards the component. The component must not be used after calling this function.

GetInterface

Object GetInterface(UUID iid) throws Exception;

Returns a pointer of the specified interface, or null if the component does not support such an interface. Interface IDs are defined in the Guids class.