mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added null safety annotations to plugin interfaces.
This commit is contained in:
@@ -1,24 +1,32 @@
|
||||
package org.briarproject.api.plugins.simplex;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.api.plugins.Plugin;
|
||||
import org.briarproject.api.plugins.TransportConnectionReader;
|
||||
import org.briarproject.api.plugins.TransportConnectionWriter;
|
||||
|
||||
/** An interface for transport plugins that support simplex communication. */
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* An interface for transport plugins that support simplex communication.
|
||||
*/
|
||||
@NotNullByDefault
|
||||
public interface SimplexPlugin extends Plugin {
|
||||
|
||||
/**
|
||||
* Attempts to create and return a reader for the given contact using the
|
||||
* current transport and configuration properties. Returns null if a reader
|
||||
* could not be created.
|
||||
* cannot be created.
|
||||
*/
|
||||
@Nullable
|
||||
TransportConnectionReader createReader(ContactId c);
|
||||
|
||||
/**
|
||||
* Attempts to create and return a writer for the given contact using the
|
||||
* current transport and configuration properties. Returns null if a writer
|
||||
* could not be created.
|
||||
* cannot be created.
|
||||
*/
|
||||
@Nullable
|
||||
TransportConnectionWriter createWriter(ContactId c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user