<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>networking &#8211; Blackbams Blog</title>
	<atom:link href="https://blog.blackbam.at/de/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.blackbam.at/de</link>
	<description>development - digital arts - internet</description>
	<lastBuildDate>Wed, 23 Jan 2013 08:38:47 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.4</generator>
	<item>
		<title>Java RMI five Minutes tutorial</title>
		<link>https://blog.blackbam.at/de/2013/01/23/java-rmi-5-minutes-tutorial/</link>
					<comments>https://blog.blackbam.at/de/2013/01/23/java-rmi-5-minutes-tutorial/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Wed, 23 Jan 2013 08:38:47 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[rmi]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2030</guid>

					<description><![CDATA[This ultra short tutorial is just a summary of how Java RMI (remote method invocation) works. For explanation please check one of the other tutorials which you will find easily easily your favorite search engine. 1. Write RMI-Server Interface extends package java.rmi.Remote provide all methods to be called remotely each methods must through a remote [&#8230;]]]></description>
										<content:encoded><![CDATA[This ultra short tutorial is just a summary of how Java RMI (remote method invocation) works. For explanation please check one of the other tutorials which you will find easily easily your favorite search engine.
<h2>1. Write RMI-Server Interface</h2>
<ul>
	<li>extends package java.rmi.Remote</li>
	<li>provide all methods to be called remotely</li>
	<li>each methods must through a remote exception</li>
</ul>

<pre lang="java">
import java.rmi.*;
 
public interface ServerInterface extends Remote {
     public void method1() throws RemoteException;
     public int method2() throws RemoteException;
     // ...
}</pre>
<h2>2. Write Server Class</h2>
<ul>
	<li>implements RMI-Server Interface</li>
	<li>extends UnicastRemoteObject (at least for simple RMI)</li>
	<li>Constructor throws java.rmi.RemoteException</li>
	<li>must be registered at local registry</li>
</ul>
&nbsp;
<pre lang="java"> 
import java.rmi.*;
import java.net.MalformedURLExcpetion;
import java.rmi.registry.*;
import java.rmi.server.UnicastRemoteObject;
 
public class MyServer extends UnicastRemoteObject implements ServerInterface {
 
  MyServer() throws RemoteException {
    super();
  }
 
  public static void main(String[] args) {

    try {
      LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
    } catch (RemoteException ex) {
      System.out.println(ex.getMessage());
    }
    try {
      Naming.rebind("MyServer", new MyServer());
    } catch (MalformedURLException ex) {
      System.out.println(ex.getMessage());
    }
    catch (RemoteException ex) {
      System.out.println(ex.getMessage());
    }
  }
  // ...
}</pre>
<h2>3. Write a client</h2>
<ul>
	<li>get remote reference</li>
	<li>call remote methods</li>
	<li>be careful with rmi-specific problems (a more detailed tutorial will explain to you)</li>
</ul>
&nbsp;
<pre lang="java">// any class, ...
// url expects String in url format (e.g. http://127.0.0.1/MyServer for local testing)
 
try {
      ServerInterface server = (ServerInterface) Naming.lookup(url);
      server.method1();
      int calculated_by_server = server.method2();
      // ...
} catch (Exception ex) {

}</pre>
&nbsp;

<strong>API reference:</strong>
<ul>
	<li>RMI: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/Remote.html" rel="nofollow">Remote API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/server/UnicastRemoteObject.html" rel="nofollow">UnicastRemoteObject API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/registry/Registry.html" rel="nofollow">Registry API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/registry/LocateRegistry.html" rel="nofollow">LocateRegistry API</a></li>
	<li>Properties: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/util/Properties.html" rel="nofollow">Properties API</a></li>
	<li>IO: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/io/package-summary.html" rel="nofollow">IO Package API</a></li>
</ul>
&nbsp;

<strong>Further reading:</strong>
<a href="http://docs.oracle.com/javase/tutorial/rmi/index.html">http://docs.oracle.com/javase/tutorial/rmi/index.html</a><p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2Fde%2F2013%2F01%2F23%2Fjava-rmi-5-minutes-tutorial%2F&#038;title=Java%20RMI%20five%20Minutes%20tutorial" data-a2a-url="https://blog.blackbam.at/de/2013/01/23/java-rmi-5-minutes-tutorial/" data-a2a-title="Java RMI five Minutes tutorial"><img class="colorbox-2030"  src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/de/2013/01/23/java-rmi-5-minutes-tutorial/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Learning Java networking and concurrency</title>
		<link>https://blog.blackbam.at/de/2013/01/22/learning-java-concurrency/</link>
					<comments>https://blog.blackbam.at/de/2013/01/22/learning-java-concurrency/#comments</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 18:12:19 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[rmi]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2025</guid>

					<description><![CDATA[This tutorial is written while learning for a university test in distributed systems. The aim of this article is to remember the most important facts and steps to understand distributed programming in the Java language. This tutorial is useful for programmers which are able to use Java, but want to learn more about concurrency.   [&#8230;]]]></description>
										<content:encoded><![CDATA[This tutorial is written while learning for a university test in distributed systems. The aim of this article is to remember the most important facts and steps to understand distributed programming in the Java language. This tutorial is useful for programmers which are able to use Java, but want to learn more about concurrency.   As oracle provides everything you need to learn that in detail, including examples, this is just a collection of other tutorials you should learn step by step. This collection is adapted from the course of the distributed systems group of the technical university of vienna.
<h2>1. Learning the Basics of Network communication</h2>
<ul>
	<li><a href="http://java.sun.com/docs/books/tutorial/networking/overview/networking.html" rel="nofollow">Networking Basics</a>: Short explanation of networking basics like TCP, UDP and ports.</li>
	<li><a href="http://java.sun.com/docs/books/tutorial/essential/io/index.html" rel="nofollow">Java IO Tutorial</a>: It's absolutely necessary to be familiar with I/O and streams to do sockets operations!</li>
	<li><a href="http://java.sun.com/docs/books/tutorial/networking/sockets/index.html" rel="nofollow">Java TCP Sockets Tutorial</a>: A very useful introduction to (TCP) sockets programming.</li>
	<li><a href="http://java.sun.com/docs/books/tutorial/networking/datagrams/index.html" rel="nofollow">Java Datagrams Tutorial</a>: Provides all the information you need to send and receive datagram packets using UDP.</li>
	<li><a href="http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html" rel="nofollow">Java Concurrency Tutorial</a>: A tutorial about concurrency that covers threads, thread-pools and synchronization.</li>
	<li>Java Programmierhandbuch und Referenz - Section <a href="http://dpunkt.de/java//Programmieren_mit_Java/Netzwerkprogrammierung/16.html" rel="nofollow">13.2.3</a>: German tutorial for using datagram sockets. (optional)</li>
</ul>
<h4>Important Java-API Classes:</h4>
<ul>
	<li>IO: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/io/package-summary.html" rel="nofollow">IO Package API</a></li>
	<li>Concurrency: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/lang/Thread.html" rel="nofollow">Thread API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/lang/Runnable.html" rel="nofollow">Runnable API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/util/concurrent/ExecutorService.html" rel="nofollow">ExecutorService API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/util/concurrent/Executors.html" rel="nofollow">Executors API</a></li>
	<li>Java TCP Sockets: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/net/ServerSocket.html" rel="nofollow">ServerSocket API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/net/Socket.html" rel="nofollow">Socket API</a></li>
	<li>Java Datagrams: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/net/DatagramSocket.html" rel="nofollow">DatagramSocket API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/net/DatagramPacket.html" rel="nofollow">DatagramPacket API</a></li>
</ul>
<h2>2. Learning RMI</h2>
<ul>
	<li><a href="http://java.sun.com/docs/books/tutorial/rmi/index.html" rel="nofollow">Java RMI Tutorial</a>: A short introduction into RMI.</li>
	<li><a href="http://java.sun.com/developer/onlineTraining/rmi/RMI.html" rel="nofollow">JGuru RMI Tutorial</a>: A more detailed tutorial about RMI.</li>
	<li><a href="http://sws.bfh.ch/~amrhein/Swing/javainsel7/javainsel_18_002.htm#mj86a2f66f92fc91213a3690e4c513bb4e" rel="nofollow">JavaInsel RMI Tutorial</a>: German introduction into RMI programming. (optional)</li>
</ul>
<h4>Important Java-API Classes:</h4>
<ul>
	<li>RMI: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/Remote.html" rel="nofollow">Remote API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/server/UnicastRemoteObject.html" rel="nofollow">UnicastRemoteObject API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/registry/Registry.html" rel="nofollow">Registry API</a>, <a href="http://java.sun.com/javase/6/docs/api/index.html?java/rmi/registry/LocateRegistry.html" rel="nofollow">LocateRegistry API</a></li>
	<li>Properties: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/util/Properties.html" rel="nofollow">Properties API</a></li>
	<li>IO: <a href="http://java.sun.com/javase/6/docs/api/index.html?java/io/package-summary.html" rel="nofollow">IO Package API</a></li>
</ul>
&nbsp;
<h2>3. Security</h2>
<ul>
	<li>Chapter 9 - Security from the book <em>Distributed Systems: Principles and Paradigms (2nd edition)</em></li>
	<li><a href="http://download.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html" rel="nofollow">Java Cryptography Architecture (JCA) Reference Guide</a>: Tutorial about the Java Cryptography Architecture (JCA)</li>
	<li><a href="http://www.cacr.math.uwaterloo.ca/hac/" rel="nofollow">Handbook of Applied Cryptography</a> (free version) (optional)</li>
</ul>
<h4>Important Java-API Classes:</h4>
<ul>
	<li>Java SE 6: <a href="http://download.oracle.com/javase/6/docs/api/javax/crypto/Cipher.html" rel="nofollow">Cipher</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/security/SecureRandom.html" rel="nofollow">SecureRandom</a>, and <a href="http://download.oracle.com/javase/6/docs/api/java/security/Signature.html" rel="nofollow">Signature</a> classes</li>
	<li>Bouncy Castle: <a href="http://www.bouncycastle.org/docs/docs1.6/org/bouncycastle/openssl/PEMReader.html" rel="nofollow">PEMReader</a> and <a href="http://www.bouncycastle.org/docs/docs1.6/org/bouncycastle/util/encoders/Base64.html" rel="nofollow">Base64</a></li>
</ul>
&nbsp;<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2Fde%2F2013%2F01%2F22%2Flearning-java-concurrency%2F&#038;title=Learning%20Java%20networking%20and%20concurrency" data-a2a-url="https://blog.blackbam.at/de/2013/01/22/learning-java-concurrency/" data-a2a-title="Learning Java networking and concurrency"><img class="colorbox-2025"  src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/de/2013/01/22/learning-java-concurrency/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
