SAM: Make all classes package private except the SAMBridge entry point

This commit is contained in:
zzz
2014-06-27 15:26:44 +00:00
parent f3180b3f6f
commit 1047691c64
19 changed files with 19 additions and 18 deletions

View File

@@ -33,6 +33,7 @@ import net.i2p.util.Log;
/**
* SAM bridge implementation.
* This is the main entry point for SAM.
*
* @author human
*/

View File

@@ -15,7 +15,7 @@ import net.i2p.data.Destination;
/**
* Interface for sending raw data to a SAM client
*/
public interface SAMDatagramReceiver {
interface SAMDatagramReceiver {
/**
* Send a byte array to a SAM client.

View File

@@ -25,7 +25,7 @@ import net.i2p.util.Log;
*
* @author human
*/
public class SAMDatagramSession extends SAMMessageSession {
class SAMDatagramSession extends SAMMessageSession {
public static final int DGRAM_SIZE_MAX = 31*1024;

View File

@@ -13,7 +13,7 @@ package net.i2p.sam;
*
* @author human
*/
public class SAMException extends Exception {
class SAMException extends Exception {
static final long serialVersionUID = 1 ;

View File

@@ -21,7 +21,7 @@ import net.i2p.util.Log;
/**
* SAM handler factory class.
*/
public class SAMHandlerFactory {
class SAMHandlerFactory {
/**

View File

@@ -14,7 +14,7 @@ package net.i2p.sam;
*
* @author human
*/
public class SAMInvalidDirectionException extends Exception {
class SAMInvalidDirectionException extends Exception {
static final long serialVersionUID = 1 ;
public SAMInvalidDirectionException() {

View File

@@ -155,7 +155,7 @@ public abstract class SAMMessageSession {
*
* @author human
*/
public class SAMMessageSessionHandler implements Runnable, I2PSessionListener {
class SAMMessageSessionHandler implements Runnable, I2PSessionListener {
private final Object runningLock = new Object();
private volatile boolean stillRunning = true;

View File

@@ -13,7 +13,7 @@ import java.io.IOException;
/**
* Interface for sending raw data to a SAM client
*/
public interface SAMRawReceiver {
interface SAMRawReceiver {
/**
* Send a byte array to a SAM client, without informations

View File

@@ -21,7 +21,7 @@ import net.i2p.util.Log;
*
* @author human
*/
public class SAMRawSession extends SAMMessageSession {
class SAMRawSession extends SAMMessageSession {
public static final int RAW_SIZE_MAX = 32*1024;

View File

@@ -17,7 +17,7 @@ import net.i2p.data.Destination;
* Interface for sending streaming data to a SAM client
*/
public interface SAMStreamReceiver {
interface SAMStreamReceiver {
/**
* Sends the result of a stream send operation
* @param id Stream ID

View File

@@ -46,7 +46,7 @@ import net.i2p.util.Log;
*
* @author human
*/
public class SAMStreamSession {
class SAMStreamSession {
protected final Log _log;

View File

@@ -32,7 +32,7 @@ import net.i2p.util.Log;
*
* @author human
*/
public class SAMUtils {
class SAMUtils {
//private final static Log _log = new Log(SAMUtils.class);

View File

@@ -35,7 +35,7 @@ import net.i2p.util.Log;
*
* @author human
*/
public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatagramReceiver, SAMStreamReceiver {
class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatagramReceiver, SAMStreamReceiver {
protected SAMRawSession rawSession;
protected SAMDatagramSession datagramSession;

View File

@@ -21,7 +21,7 @@ import net.i2p.util.Log;
* @author mkvore
*/
public class SAMv2Handler extends SAMv1Handler implements SAMRawReceiver, SAMDatagramReceiver, SAMStreamReceiver
class SAMv2Handler extends SAMv1Handler implements SAMRawReceiver, SAMDatagramReceiver, SAMStreamReceiver
{

View File

@@ -37,7 +37,7 @@ import net.i2p.util.Log;
* @author mkvore
*/
public class SAMv2StreamSession extends SAMStreamSession
class SAMv2StreamSession extends SAMStreamSession
{
/**

View File

@@ -17,7 +17,7 @@ import java.net.InetSocketAddress;
import java.net.SocketAddress ;
import java.nio.ByteBuffer;
public class SAMv3DatagramSession extends SAMDatagramSession implements SAMv3Handler.Session, SAMDatagramReceiver {
class SAMv3DatagramSession extends SAMDatagramSession implements SAMv3Handler.Session, SAMDatagramReceiver {
private final SAMv3Handler handler;
private final SAMv3Handler.DatagramServer server;

View File

@@ -41,7 +41,7 @@ import net.i2p.util.I2PAppThread;
* @author mkvore
*/
public class SAMv3Handler extends SAMv1Handler
class SAMv3Handler extends SAMv1Handler
{
private Session session;

View File

@@ -18,7 +18,7 @@ import net.i2p.util.Log;
* @author MKVore
*
*/
public class SAMv3RawSession extends SAMRawSession implements SAMv3Handler.Session, SAMRawReceiver {
class SAMv3RawSession extends SAMRawSession implements SAMv3Handler.Session, SAMRawReceiver {
private final String nick;
private final SAMv3Handler handler;

View File

@@ -34,7 +34,7 @@ import java.nio.channels.SocketChannel;
* @author mkvore
*/
public class SAMv3StreamSession extends SAMStreamSession implements SAMv3Handler.Session
class SAMv3StreamSession extends SAMStreamSession implements SAMv3Handler.Session
{
private static final int BUFFER_SIZE = 1024 ;