forked from I2P_Developers/i2p.i2p
SAM: Make all classes package private except the SAMBridge entry point
This commit is contained in:
@@ -33,6 +33,7 @@ import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
* SAM bridge implementation.
|
||||
* This is the main entry point for SAM.
|
||||
*
|
||||
* @author human
|
||||
*/
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -13,7 +13,7 @@ package net.i2p.sam;
|
||||
*
|
||||
* @author human
|
||||
*/
|
||||
public class SAMException extends Exception {
|
||||
class SAMException extends Exception {
|
||||
|
||||
static final long serialVersionUID = 1 ;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ import net.i2p.util.Log;
|
||||
/**
|
||||
* SAM handler factory class.
|
||||
*/
|
||||
public class SAMHandlerFactory {
|
||||
class SAMHandlerFactory {
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -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() {
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -46,7 +46,7 @@ import net.i2p.util.Log;
|
||||
*
|
||||
* @author human
|
||||
*/
|
||||
public class SAMStreamSession {
|
||||
class SAMStreamSession {
|
||||
|
||||
protected final Log _log;
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
{
|
||||
|
||||
|
||||
|
@@ -37,7 +37,7 @@ import net.i2p.util.Log;
|
||||
* @author mkvore
|
||||
*/
|
||||
|
||||
public class SAMv2StreamSession extends SAMStreamSession
|
||||
class SAMv2StreamSession extends SAMStreamSession
|
||||
{
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
@@ -41,7 +41,7 @@ import net.i2p.util.I2PAppThread;
|
||||
* @author mkvore
|
||||
*/
|
||||
|
||||
public class SAMv3Handler extends SAMv1Handler
|
||||
class SAMv3Handler extends SAMv1Handler
|
||||
{
|
||||
|
||||
private Session session;
|
||||
|
@@ -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;
|
||||
|
@@ -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 ;
|
||||
|
Reference in New Issue
Block a user