@@ -104,6 +104,8 @@ public static class Aspect
104104
105105 public BitcoinCompliant BITCOIN_COMPONENT ;
106106
107+ public RSACompliant RSA_COMPONENT ;
108+
107109 public ConnectionStatusServer CONNECTION_STATUS ;
108110
109111 public MySQLComponent MYSQL_COMPONENT = new MySQLComponent ();
@@ -115,6 +117,7 @@ public static class Aspect
115117 /** Start CONNECTION_STATUS and NitroWebExpress.SELF together. */
116118 public void start ()
117119 {
120+ if (RSA_COMPONENT != null ) RSA_COMPONENT .start ();
118121 if (CONNECTION_STATUS != null ) CONNECTION_STATUS .start ();
119122 if (MODULE_INSTALLER_SERVICE != null ) MODULE_INSTALLER_SERVICE .start ();
120123 if (ASCII_CREATOR_SERVER != null ) ASCII_CREATOR_SERVER .start ();
@@ -886,6 +889,64 @@ public void send_message(final String MESSAGE)
886889 }
887890 }
888891
892+ public static class RSACompliant extends WebExpress
893+ {
894+ public static final Integer DEFAULT_PORT = 7743 ;
895+ public static final String DEFAULT_THREAD = "WEBEXPRESS_RSA_SERVER" ;
896+
897+ protected final RSACompliant .MessageOutputHandler RSA_MESSAGE_OUTPUT_HANDLER = new RSACompliant .MessageOutputHandler ();
898+
899+ public messaging .MessageQueueSorter MESSAGE_QUEUE_SORTER ;
900+ public messaging .MessageQueue MESSAGE_QUEUE ;
901+ public java .net .Socket SOCKET ;
902+
903+ public final encryption .module .rsa .EncryptionModuleRSA ENCRYPTION_MODULE =
904+ new encryption .module .rsa .EncryptionModuleRSA ();
905+
906+ public RSACompliant (final String HOST , final Integer PORT , final String THREAD_NAME , final Boolean TELNET_PROXY_ENABLED )
907+ {
908+ if (HOST == null || PORT == null || THREAD_NAME == null || TELNET_PROXY_ENABLED == null )
909+ throw new SecurityException ("//bodi/connect" );
910+
911+ super (HOST , PORT , THREAD_NAME , TELNET_PROXY_ENABLED );
912+
913+ this .HOST = HOST ;
914+ this .PORT = PORT ;
915+ this .MESSAGE_QUEUE = new messaging .MessageQueue (this );
916+ this .MESSAGE_QUEUE_SORTER = new messaging .MessageQueueSorter (this );
917+ this .setName (THREAD_NAME );
918+
919+ CommonRails .printSystemComponent (this , this .hashCode (),
920+ ". RSACompliant starting on " + HOST + ":" + PORT + " ." );
921+ }
922+
923+ public RSACompliant () {}
924+
925+ protected static class MessageOutputHandler
926+ {
927+ public java .net .Socket SOCKET ;
928+
929+ public MessageOutputHandler ()
930+ {
931+ CommonRails .printSystemComponent (this , this .hashCode (), ". RSACompliant MessageOutputHandler starts ." );
932+ }
933+
934+ public void send_message (final String MESSAGE )
935+ {
936+ if (MESSAGE == null ) throw new SecurityException ("//bodi/connect" );
937+ messaging .MessageOutputHandler h = new messaging .MessageOutputHandler (SOCKET , MESSAGE );
938+ h .run ();
939+ }
940+
941+ public void send_message (final StringBuffer BUFFER )
942+ {
943+ if (BUFFER == null ) throw new SecurityException ("//bodi/connect" );
944+ messaging .MessageOutputHandler h = new messaging .MessageOutputHandler (SOCKET , BUFFER );
945+ h .run ();
946+ }
947+ }
948+ }
949+
889950 public static class BitcoinCompliant extends WebExpress
890951 {
891952 protected BitcoinCompliant .MessageOutputHandler bitcoin_message_output_handler = new BitcoinCompliant .MessageOutputHandler ();
0 commit comments